projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff27650
)
hush: Fix bogus free() call
author
Peter Tyser
<ptyser@xes-inc.com>
Wed, 5 Aug 2009 21:18:44 +0000
(16:18 -0500)
committer
Wolfgang Denk
<wd@denx.de>
Sun, 9 Aug 2009 21:02:42 +0000
(23:02 +0200)
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 <ptyser@xes-inc.com>
common/hush.c
patch
|
blob
|
history
diff --git
a/common/hush.c
b/common/hush.c
index 97fd07067ea7bf770e33faacfc18d5afe2fea514..528dd254a5064cf6c45c00f9b8689858222de306 100644
(file)
--- 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);