diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/params.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 0f140d1ee..8757583f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-23 Clint Adams <clint@zsh.org> + + * 25926: Src/params.c: free val only after it may be passed to + strlen (as in 25656). + 2008-10-20 Peter Stephenson <pws@csr.com> * unposted: Config/version.mk: 4.3.6-dev-2. diff --git a/Src/params.c b/Src/params.c index 71cb2a907..0faf667b9 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2253,10 +2253,10 @@ setstrvalue(Value v, char *val) mnumber mn = matheval(val); v->pm->gsu.f->setfn(v->pm, (mn.type & MN_FLOAT) ? mn.u.d : (double)mn.u.l); - zsfree(val); if ((v->pm->node.flags & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z)) && !v->pm->width) v->pm->width = strlen(val); + zsfree(val); } break; case PM_ARRAY: |