From: Artur Wojcik Date: Thu, 10 Dec 2009 19:03:40 +0000 (-0700) Subject: Fix for memory leak defect. X-Git-Tag: mdadm-3.1.2~63^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=389508223e22807e7fb42ada4ad9d61416cc7afd;p=thirdparty%2Fmdadm.git Fix for memory leak defect. Possible memory leak. Dynamic memory stored in 'dev' and 'dev' allocated through function 'malloc' can be lost on exit path. Signed-off-by: Artur Wojcik Signed-off-by: Dan Williams --- diff --git a/super-intel.c b/super-intel.c index 5c967b2a..d87b2b03 100644 --- a/super-intel.c +++ b/super-intel.c @@ -2810,6 +2810,8 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info, map->ddf = 1; if (info->level == 1 && info->raid_disks > 2) { + free(dev); + free(dv); fprintf(stderr, Name": imsm does not support more than 2 disks" "in a raid1 volume\n"); return 0;