From: Jes Sorensen <redacted>
Signed-off-by: Jes Sorensen <redacted>
---
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