From 7b1fe930bf82c034f3479334dae86b58524c268a Mon Sep 17 00:00:00 2001 From: jaredy Date: Mon, 11 Aug 2008 21:50:35 +0000 Subject: [PATCH] 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@. --- bin/ksh/tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.20.1