]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
avoid double-free upon "old buggy kernel" sysfs_read failure
authorJim Meyering <jim@meyering.net>
Tue, 21 Feb 2012 12:02:22 +0000 (13:02 +0100)
committerNeilBrown <neilb@suse.de>
Tue, 21 Feb 2012 20:14:36 +0000 (07:14 +1100)
* Incremental.c (Incremental): On sysfs_read failure, don't call
sysfs_free(sra) just before "goto out_unlock", since that very
same "sra" is freed the same way by the clean-up code below.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Incremental.c

index b457bf38a9d14b3dc74ff785adf68081e80fabe2..836a6f1f5b4fce9aad89c8df717357e84b5d19bb 100644 (file)
@@ -325,7 +325,6 @@ int Incremental(char *devname, int verbose, int runstop,
                        fprintf(stderr, Name
                      ": You have an old buggy kernel which cannot support\n"
                                "      --incremental reliably.  Aborting.\n");
-                       sysfs_free(sra);
                        rv = 2;
                        goto out_unlock;
                }