From 6b68cc95c7448201d11b87004715fd8e8cd6543e Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sat, 13 Sep 2008 08:19:17 +0000 Subject: 25656: free val only after it may be passed to strlen(). --- ChangeLog | 3 +++ Src/params.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bf27348fd..84ed5c287 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-09-13 Clint Adams + * 25656: Src/params.c: free val only after it may be passed to + strlen(). + * 25655: Completion/Unix/Command/_rsync: remove completion for --remove-sent-files option. diff --git a/Src/params.c b/Src/params.c index 39bc8515a..58927f1c0 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2235,10 +2235,10 @@ setstrvalue(Value v, char *val) case PM_INTEGER: if (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)) && !v->pm->width) v->pm->width = strlen(val); + zsfree(val); } if (!v->pm->base && lastbase != -1) v->pm->base = lastbase; -- cgit 1.4.1