dfu: Fix memory leak in dfu_init_env_entities()
authorSam Protsenko <semen.protsenko@linaro.org>
Fri, 13 Jul 2018 13:35:46 +0000 (16:35 +0300)
committerMarek Vasut <marex@denx.de>
Wed, 8 Aug 2018 20:22:08 +0000 (22:22 +0200)
commit87a8ca985bc0b63f8ad166b648f54496e097101e
treeccbb4478810958783c5ab87658df44be34bf1c34
parentfeaa7856f50ec5bbf843d533ee223aedd845452c
dfu: Fix memory leak in dfu_init_env_entities()

In case of error in dfu_init_env_entities(), env_bkp will leak. Fix it
by providing single return path.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
drivers/dfu/dfu.c