diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2008-08-11 21:50:36 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2008-08-11 21:50:36 +0000 |
commit | f061b55d3cc19323d844fb6159a9058dc00c6b4d (patch) | |
tree | 7f34d54d148f428640d050756b934b7f00742714 /bin/ksh/tree.c | |
parent | 1e40b562ca211d159552741c5ad95f831a794e5c (diff) |
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@.
Diffstat (limited to 'bin/ksh/tree.c')
-rw-r--r-- | bin/ksh/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |