diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2011-11-01 04:54:56 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-11-01 04:54:56 +0100 |
commit | c9aaf5effb5e4afe5dd1e4d08188140bc596808e (patch) | |
tree | efaf42041ad10c4289788256d27d0398f718ff47 /super-gpt.c | |
parent | partition_try_spare() use closedir() to release DIR * returned by opendir() (diff) | |
download | mdadm-c9aaf5effb5e4afe5dd1e4d08188140bc596808e.tar.xz mdadm-c9aaf5effb5e4afe5dd1e4d08188140bc596808e.zip |
Fix memory leak
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-gpt.c')
-rw-r--r-- | super-gpt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/super-gpt.c b/super-gpt.c index 6f852aa1..b8c9aae9 100644 --- a/super-gpt.c +++ b/super-gpt.c @@ -179,8 +179,10 @@ static struct supertype *match_metadata_desc(char *arg) if (!st) return st; - if (strcmp(arg, "gpt") != 0) + if (strcmp(arg, "gpt") != 0) { + free(st); return NULL; + } st->ss = &gpt; st->info = NULL; |