From: Adam Kwolek Date: Wed, 21 Sep 2011 01:55:15 +0000 (+1000) Subject: FIX: Memory leak during Assembly X-Git-Tag: mdadm-3.2.3~157 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=commitdiff_plain;h=910e9fa7f95f65aba6adbaaa9a1720820cab60b5 FIX: Memory leak during Assembly For fdlist pointer allocated in assemble_container_content() function, free() is never called. This patch fixes this memory leak. Signed-off-by: Adam Kwolek Signed-off-by: NeilBrown --- diff --git a/Assemble.c b/Assemble.c index 25cfec1d..66d2ee42 100644 --- a/Assemble.c +++ b/Assemble.c @@ -1584,6 +1584,7 @@ int assemble_container_content(struct supertype *st, int mdfd, if (fdlist[spare] >= 0) close(fdlist[spare]); } + free(fdlist); if (err) { fprintf(stderr, Name ": Failed to restore critical" " section for reshape - sorry.\n");