]> git.sur5r.net Git - u-boot/blobdiff - common/hush.c
hush: Fix bogus free() call
[u-boot] / common / hush.c
index 97fd07067ea7bf770e33faacfc18d5afe2fea514..528dd254a5064cf6c45c00f9b8689858222de306 100644 (file)
@@ -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);