fw_env: Fix double free

addr0 is being freed twice, leading to segmentation fault

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
This commit is contained in:
Björn Stenberg 2019-04-17 16:56:54 +02:00 committed by Tom Rini
parent c8aac24629
commit 2b4ea2b344

2
tools/env/fw_env.c vendored
View file

@ -1566,7 +1566,7 @@ int fw_env_open(struct env_opts *opts)
free(addr0);
if (addr1)
free(addr0);
free(addr1);
return ret;
}