diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2018-08-27 05:10:51 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2018-09-27 16:29:48 +0200 |
commit | d8b0173894fb4810d861ce390e241216bdfaf325 (patch) | |
tree | e715aa0398518c0abaea8abd2e7561641d37cbb1 | |
parent | imsm: Avoid duplicate entries in --detail-platform (diff) | |
download | mdadm-d8b0173894fb4810d861ce390e241216bdfaf325.tar.xz mdadm-d8b0173894fb4810d861ce390e241216bdfaf325.zip |
Assemble: free resources in load_devices
Like other failure cases in load_devices, we need
to free those resources as well.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r-- | Assemble.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -594,6 +594,9 @@ static int load_devices(struct devs *devices, char *devmap, if (strcmp(c->update, "ppl") == 0 && ident->bitmap_fd >= 0) { pr_err("PPL is not compatible with bitmap\n"); + close(mdfd); + free(devices); + free(devmap); return -1; } |