From: Denis Vlasenko Date: Sun, 13 Jul 2008 20:39:23 +0000 (-0000) Subject: ash: small code shrink X-Git-Tag: 1_12_0~189 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3177ba08522fd49292f37deecc59db0f75b046fd;p=oweals%2Fbusybox.git ash: small code shrink --- diff --git a/shell/ash.c b/shell/ash.c index 08bdfc3b3..7a63fcec7 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -1656,12 +1656,12 @@ struct shparam { static void freeparam(volatile struct shparam *param) { - char **ap; - if (param->malloced) { - for (ap = param->p; *ap; ap++) - free(*ap); - free(param->p); + char **ap, **ap1; + ap = ap1 = param->p; + while (*ap) + free(*ap++); + free(ap1); } }