diff options
author | Nigel Croxon <ncroxon@redhat.com> | 2024-11-04 17:17:46 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mtkaczyk@kernel.org> | 2024-12-16 10:10:45 +0100 |
commit | 8f54ce5b7eb0ca982803e270082e33f50897b9a6 (patch) | |
tree | 4b9f1a6eb1e26340f0fb648a370df43b17bc9fb1 /Assemble.c | |
parent | Release mdadm-4.4 (diff) | |
download | mdadm-8f54ce5b7eb0ca982803e270082e33f50897b9a6.tar.xz mdadm-8f54ce5b7eb0ca982803e270082e33f50897b9a6.zip |
Coverity fixes resources leaks
Handle variable going out of scope leaks the handle.
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |