From: NeilBrown Date: Mon, 9 Jul 2012 07:20:25 +0000 (+1000) Subject: Assemble: don't leak memory with fdlist. X-Git-Tag: mdadm-3.2.6~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=517f135d32cfe44a9ac8b0686dbb7be1bcabc867;p=thirdparty%2Fmdadm.git Assemble: don't leak memory with fdlist. We should free fdlist when finished with it. Signed-off-by: NeilBrown --- diff --git a/Assemble.c b/Assemble.c index 227d66fc..8c8aad37 100644 --- a/Assemble.c +++ b/Assemble.c @@ -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)