Fix memory leak

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Jes Sorensen 2011-11-01 14:54:56 +11:00 committed by NeilBrown
parent be5c60e3fb
commit c9aaf5effb
1 changed files with 3 additions and 1 deletions

View File

@ -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;