]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fw_env: Fix double free
authorBjörn Stenberg <bjorn@haxx.se>
Wed, 17 Apr 2019 14:56:54 +0000 (16:56 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 26 Apr 2019 22:58:21 +0000 (18:58 -0400)
addr0 is being freed twice, leading to segmentation fault

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
tools/env/fw_env.c

index a5d75958e1b65970ac5c8a486cab045959a3fdce..1ed0f7e9cb9fd7ad2f5fbf47c01160e60590236c 100644 (file)
@@ -1566,7 +1566,7 @@ int fw_env_open(struct env_opts *opts)
                free(addr0);
 
        if (addr1)
-               free(addr0);
+               free(addr1);
 
        return ret;
 }