From: Jim Meyering Date: Tue, 21 Feb 2012 12:02:22 +0000 (+0100) Subject: avoid double-free upon "old buggy kernel" sysfs_read failure X-Git-Tag: mdadm-3.2.4~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9200d418d049aff77b3d0ad8f30f1a16adc56030;p=thirdparty%2Fmdadm.git avoid double-free upon "old buggy kernel" sysfs_read failure * 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 Signed-off-by: NeilBrown --- diff --git a/Incremental.c b/Incremental.c index b457bf38..836a6f1f 100644 --- a/Incremental.c +++ b/Incremental.c @@ -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; }