]> 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>
Thu, 27 Sep 2012 06:49:54 +0000 (16:49 +1000)
We should free fdlist when finished with it.

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

index 227d66fc68d9e7a227f6a9099efa4efbdfbfb486..8c8aad37b26dabf0d32a53ca09a12d616b02dabf 100644 (file)
@@ -1239,6 +1239,7 @@ int Assemble(struct supertype *st, char *mddev,
                        i--;
                        if (fdlist[i]>=0) close(fdlist[i]);
                }
+               free(fdlist);
                if (err) {
                        fprintf(stderr, Name ": Failed to restore critical section for reshape, sorry.\n");
                        if (backup_file == NULL)