From c9aaf5effb5e4afe5dd1e4d08188140bc596808e Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Tue, 1 Nov 2011 14:54:56 +1100 Subject: [PATCH] Fix memory leak Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- super-gpt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/super-gpt.c b/super-gpt.c index 6f852aa..b8c9aae 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;