From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- super-mbr.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/super-mbr.c b/super-mbr.c index 5eefdf6..6499963 100644 --- a/super-mbr.c +++ b/super-mbr.c @@ -169,13 +169,14 @@ static void getinfo_mbr(struct supertype *st, struct mdinfo *info, char *map) static struct supertype *match_metadata_desc(char *arg) { - struct supertype *st = malloc(sizeof(*st)); + struct supertype *st; - if (!st) - return st; if (strcmp(arg, "mbr") != 0) return NULL; + st = malloc(sizeof(*st)); + if (!st) + return st; st->ss = &mbr; st->info = NULL; st->minor_version = 0; -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html