From: Jes Sorensen Date: Tue, 1 Nov 2011 03:54:56 +0000 (+1100) Subject: Fix memory leak X-Git-Tag: mdadm-3.2.3~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9aaf5effb5e4afe5dd1e4d08188140bc596808e;p=thirdparty%2Fmdadm.git Fix memory leak Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- 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;