summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-06-26 15:10:55 +1000
committerNeil Brown <neilb@suse.de>2006-06-26 15:10:55 +1000
commit8bd2e0c3390e54c1f1fa0daa701dd44e28f5e18d (patch)
tree9a78cd00a97848db673c0964fee249829cff7ec6 /Monitor.c
parent45e878bba6b490bf204db824be71f070689c8737 (diff)
downloadmdadm-8bd2e0c3390e54c1f1fa0daa701dd44e28f5e18d.tar.gz
mdadm-8bd2e0c3390e54c1f1fa0daa701dd44e28f5e18d.tar.xz
mdadm-8bd2e0c3390e54c1f1fa0daa701dd44e28f5e18d.zip
Fix user-after-free bug in error path in --monitor mode.
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Monitor.c b/Monitor.c
index 5797870..7a8c071 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);