summaryrefslogtreecommitdiff
path: root/drivers/dfu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dfu')
-rw-r--r--drivers/dfu/dfu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 8f5915e..20dfcbb 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -468,8 +468,10 @@ int dfu_config_entities(char *env, char *interface, char *devstr)
s = strsep(&env, ";");
ret = dfu_fill_entity(&dfu[i], s, alt_num_cnt, interface,
devstr);
- if (ret)
+ if (ret) {
+ free(dfu);
return -1;
+ }
list_add_tail(&dfu[i].list, &dfu_list);
alt_num_cnt++;