From: jaredy Date: Mon, 11 Aug 2008 21:50:35 +0000 (+0000) Subject: plug a memleak when freeing io redirection in commands. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7b1fe930bf82c034f3479334dae86b58524c268a;p=openbsd 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@. --- diff --git a/bin/ksh/tree.c b/bin/ksh/tree.c index a9c725b34b1..b46434e7c86 100644 --- a/bin/ksh/tree.c +++ b/bin/ksh/tree.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* * command tree climbing @@ -706,4 +706,5 @@ iofree(struct ioword **iow, Area *ap) afree((void*)p->heredoc, ap); afree((void*)p, ap); } + afree(iow, ap); }