mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
25656: free val only after it may be passed to strlen().
This commit is contained in:
parent
2b5ecaf476
commit
6b68cc95c7
2 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
||||||
2008-09-13 Clint Adams <clint@zsh.org>
|
2008-09-13 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
|
* 25656: Src/params.c: free val only after it may be passed to
|
||||||
|
strlen().
|
||||||
|
|
||||||
* 25655: Completion/Unix/Command/_rsync: remove completion for
|
* 25655: Completion/Unix/Command/_rsync: remove completion for
|
||||||
--remove-sent-files option.
|
--remove-sent-files option.
|
||||||
|
|
||||||
|
|
|
@ -2235,10 +2235,10 @@ setstrvalue(Value v, char *val)
|
||||||
case PM_INTEGER:
|
case PM_INTEGER:
|
||||||
if (val) {
|
if (val) {
|
||||||
v->pm->gsu.i->setfn(v->pm, mathevali(val));
|
v->pm->gsu.i->setfn(v->pm, mathevali(val));
|
||||||
zsfree(val);
|
|
||||||
if ((v->pm->node.flags & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z)) &&
|
if ((v->pm->node.flags & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z)) &&
|
||||||
!v->pm->width)
|
!v->pm->width)
|
||||||
v->pm->width = strlen(val);
|
v->pm->width = strlen(val);
|
||||||
|
zsfree(val);
|
||||||
}
|
}
|
||||||
if (!v->pm->base && lastbase != -1)
|
if (!v->pm->base && lastbase != -1)
|
||||||
v->pm->base = lastbase;
|
v->pm->base = lastbase;
|
||||||
|
|
Loading…
Reference in a new issue