From 517f135d32cfe44a9ac8b0686dbb7be1bcabc867 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 9 Jul 2012 17:20:25 +1000 Subject: 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 227d66f..8c8aad3 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) -- cgit v1.2.1