pull in another fix from oksh:

plug a memleak when freeing io redirection in commands.
the leaked memory is actually reclaimed when the command
finishes but may grow until that happens, e.g. during
command execution.

ok phessler@.
testing sobrado@ jmc@ oga@.
This commit is contained in:
tg 2008-09-14 20:29:13 +00:00
parent 977237ad14
commit 7cf56cf53c
1 changed files with 3 additions and 2 deletions

5
tree.c
View File

@ -1,8 +1,8 @@
/* $OpenBSD: tree.c,v 1.18 2006/04/10 14:38:59 jaredy Exp $ */
/* $OpenBSD: tree.c,v 1.19 2008/08/11 21:50:35 jaredy Exp $ */
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.18 2008/07/09 21:32:45 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.19 2008/09/14 20:29:13 tg Exp $");
#define INDENT 4
@ -689,4 +689,5 @@ iofree(struct ioword **iow, Area *ap)
afree((void*)p->heredoc, ap);
afree((void*)p, ap);
}
afree(iow, ap);
}