Fix user-after-free bug in error path in --monitor mode.

This commit is contained in:
Neil Brown 2006-06-26 15:10:55 +10:00
parent 45e878bba6
commit 8bd2e0c339
1 changed files with 1 additions and 1 deletions

View File

@ -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);