summaryrefslogtreecommitdiff
path: root/super-gpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'super-gpt.c')
-rw-r--r--super-gpt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/super-gpt.c b/super-gpt.c
index 6f852aa1..75269bf1 100644
--- a/super-gpt.c
+++ b/super-gpt.c
@@ -76,7 +76,7 @@ static int load_gpt(struct supertype *st, int fd, char *devname)
free_gpt(st);
- if (posix_memalign((void**)&super, 512, 32*512) != 0) {
+ if (posix_memalign((void**)&super, 4096, 32*512) != 0) {
fprintf(stderr, Name ": %s could not allocate superblock\n",
__func__);
return 1;
@@ -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;