Artur Wojcik: Fix for memory leak defect.
Martin F. Krafft
madduck at alioth.debian.org
Wed Jan 27 02:03:55 UTC 2010
Module: mdadm
Branch: upstream
Commit: 389508223e22807e7fb42ada4ad9d61416cc7afd
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=389508223e22807e7fb42ada4ad9d61416cc7afd
Author: Artur Wojcik <artur.wojcik at intel.com>
Date: Thu Dec 10 12:03:40 2009 -0700
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 at intel.com>
Signed-off-by: Dan Williams <dan.j.williams at intel.com>
---
super-intel.c | 2 ++
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;
More information about the pkg-mdadm-commits
mailing list