tools/env: avoid memory leak in fw_setenv
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>
Sat, 15 Apr 2017 11:05:40 +0000 (13:05 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 18 Apr 2017 14:29:22 +0000 (10:29 -0400)
commitddc6a9de057e0fd0b46ba21d16a50a8d24351ef6
tree4c21bd25dc7cedd6173aebc10e4fcb6614aa8e96
parent1ecd2a2f0600e61f2edff4fc3dce76f0f6559b67
tools/env: avoid memory leak in fw_setenv

If realloc fails we should release the old buffer.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/env/fw_env.c