mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
ash: small code shrink
This commit is contained in:
parent
ad6d6ffcdc
commit
3177ba0852
10
shell/ash.c
10
shell/ash.c
@ -1656,12 +1656,12 @@ struct shparam {
|
|||||||
static void
|
static void
|
||||||
freeparam(volatile struct shparam *param)
|
freeparam(volatile struct shparam *param)
|
||||||
{
|
{
|
||||||
char **ap;
|
|
||||||
|
|
||||||
if (param->malloced) {
|
if (param->malloced) {
|
||||||
for (ap = param->p; *ap; ap++)
|
char **ap, **ap1;
|
||||||
free(*ap);
|
ap = ap1 = param->p;
|
||||||
free(param->p);
|
while (*ap)
|
||||||
|
free(*ap++);
|
||||||
|
free(ap1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user