From 197324d7d998a791e5137b8176981b4af25220ae Mon Sep 17 00:00:00 2001 From: Peter Tyser Date: Wed, 5 Aug 2009 16:18:44 -0500 Subject: hush: Fix bogus free() call An off-by-one error in hush.c resulted in an unintentional free() call every time a command was executed Signed-off-by: Peter Tyser --- common/hush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/hush.c') diff --git a/common/hush.c b/common/hush.c index 97fd07067e..528dd254a5 100644 --- a/common/hush.c +++ b/common/hush.c @@ -2002,7 +2002,7 @@ static int free_pipe(struct pipe *pi, int indent) #ifndef __U_BOOT__ globfree(&child->glob_result); #else - for (a = child->argc;a >= 0;a--) { + for (a = 0; a < child->argc; a++) { free(child->argv[a]); } free(child->argv); -- cgit v1.2.1