X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=Incremental.c;h=bcbd78d0b4abe67ec2069922936be39447a609c5;hp=fe6aad2877712ce29f2040cb44be9569f9c5ab5e;hb=0f22b998fb9cf8478810b89cd50fa5b4fbf11d38;hpb=64436f0628a14f4e979b93bea57aba4b4c6143e8 diff --git a/Incremental.c b/Incremental.c index fe6aad28..bcbd78d0 100644 --- a/Incremental.c +++ b/Incremental.c @@ -142,11 +142,13 @@ int Incremental(char *devname, int verbose, int runstop, rv = try_spare(devname, &dfd, policy, st, verbose); goto out; } - if (st->ss->load_super(st, dfd, NULL)) { + if (st->ss->compare_super == NULL || + st->ss->load_super(st, dfd, NULL)) { if (verbose >= 0) fprintf(stderr, Name ": no RAID superblock on %s.\n", devname); rv = try_spare(devname, &dfd, policy, st, verbose); + free(st); goto out; } close (dfd); dfd = -1;