From 56dcaa6ba09b005a12dccfedbcdd68f2ca2ae23c Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 9 Jul 2012 17:20:25 +1000 Subject: [PATCH] Assemble: don't leak memory with fdlist. We should free fdlist when finished with it. Signed-off-by: NeilBrown --- Assemble.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Assemble.c b/Assemble.c index 2b7900d..8b9f541 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)