]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: don't leak memory with fdlist.
authorNeilBrown <neilb@suse.de>
Mon, 9 Jul 2012 07:20:25 +0000 (17:20 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 9 Jul 2012 07:20:25 +0000 (17:20 +1000)
We should free fdlist when finished with it.

Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 2b7900ddd5f2e7ad8723253d8099a42e4bcadfbb..8b9f541e4a96059e098dfb3f38a0be67caa58c4a 100644 (file)
@@ -1229,6 +1229,7 @@ int Assemble(struct supertype *st, char *mddev,
                        i--;
                        if (fdlist[i]>=0) close(fdlist[i]);
                }
+               free(fdlist);
                if (err) {
                        pr_err("Failed to restore critical section for reshape, sorry.\n");
                        if (c->backup_file == NULL)