From 7cf56cf53c70fd103b154a800adb9612a468940f Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 14 Sep 2008 20:29:13 +0000 Subject: [PATCH] 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@. --- tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tree.c b/tree.c index 6f14dbb..667be2f 100644 --- a/tree.c +++ b/tree.c @@ -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); }