summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Assemble.c b/Assemble.c
index 37a530ee..f8099cd3 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -753,6 +753,7 @@ static int load_devices(struct devs *devices, char *devmap,
tst->ss->free_super(tst);
free(tst);
*stp = st;
+ free(best);
return -1;
}
close(dfd);
@@ -834,7 +835,6 @@ static int load_devices(struct devs *devices, char *devmap,
inargv ? "the list" :
"the\n DEVICE list in mdadm.conf"
);
- free(best);
*stp = st;
goto error;
}
@@ -857,6 +857,7 @@ error:
close(mdfd);
free(devices);
free(devmap);
+ free(best);
return -1;
}