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.3-rc1~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56dcaa6ba09b005a12dccfedbcdd68f2ca2ae23c;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 2b7900dd..8b9f541e 100644 --- a/Assemble.c +++ b/Assemble.c @@ -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)