提交 197324d7 编写于 作者: P Peter Tyser 提交者: Wolfgang Denk

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: NPeter Tyser <ptyser@xes-inc.com>
上级 ff27650b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册