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 <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Adam Kwolek 2011-09-21 11:55:15 +10:00 committed by NeilBrown
parent ddb12f6ca6
commit 910e9fa7f9
1 changed files with 1 additions and 0 deletions

View File

@ -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");