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>
This commit is contained in:
Guoqing Jiang 2018-08-27 11:10:51 +08:00 committed by Jes Sorensen
parent 5c4cc0c820
commit d8b0173894
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}