From: Neil Brown Date: Mon, 26 Jun 2006 05:10:55 +0000 (+1000) Subject: Fix user-after-free bug in error path in --monitor mode. X-Git-Tag: mdadm-2.5.2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bd2e0c3390e54c1f1fa0daa701dd44e28f5e18d;p=thirdparty%2Fmdadm.git Fix user-after-free bug in error path in --monitor mode. --- diff --git a/Monitor.c b/Monitor.c index 5797870c..7a8c0713 100644 --- a/Monitor.c +++ b/Monitor.c @@ -383,9 +383,9 @@ int Monitor(mddev_dev_t devlist, ioctl(fd, GET_ARRAY_INFO, &array)< 0) { /* no such array */ if (fd >=0) close(fd); + put_md_name(st->devname); free(st->devname); free(st); - put_md_name(st->devname); continue; } close(fd);