mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
hush: avoid NULL check before free()
free() checks if its argument is NULL. Don't duplicate this in the calling code. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4fb0f55fd2
commit
f4070e6f6c
1 changed files with 1 additions and 2 deletions
|
@ -1849,8 +1849,7 @@ static int run_list_real(struct pipe *pi)
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
/* insert new value from list for variable */
|
/* insert new value from list for variable */
|
||||||
if (pi->progs->argv[0])
|
free(pi->progs->argv[0]);
|
||||||
free(pi->progs->argv[0]);
|
|
||||||
pi->progs->argv[0] = *list++;
|
pi->progs->argv[0] = *list++;
|
||||||
#ifndef __U_BOOT__
|
#ifndef __U_BOOT__
|
||||||
pi->progs->glob_result.gl_pathv[0] =
|
pi->progs->glob_result.gl_pathv[0] =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue