summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
authorArtur Wojcik <artur.wojcik@intel.com>2009-12-10 12:03:40 -0700
committerDan Williams <dan.j.williams@intel.com>2009-12-10 12:03:40 -0700
commit389508223e22807e7fb42ada4ad9d61416cc7afd (patch)
tree705cc80bec45db55ba10f6f40ba8523e9c48bda2 /super-intel.c
parent1602d52c99aff727440e1015411c6566736aaf7f (diff)
downloadmdadm-389508223e22807e7fb42ada4ad9d61416cc7afd.tar.gz
mdadm-389508223e22807e7fb42ada4ad9d61416cc7afd.tar.xz
mdadm-389508223e22807e7fb42ada4ad9d61416cc7afd.zip
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 <artur.wojcik@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c
index 5c967b2..d87b2b0 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;