Re: [Qemu-devel] [PATCH] monitor: fix use after free

2014-08-19 Thread Luiz Capitulino
On Mon, 18 Aug 2014 22:03:31 +0200 "Michael S. Tsirkin" wrote: > On Mon, Aug 18, 2014 at 02:05:46PM -0400, Luiz Capitulino wrote: > > On Sun, 17 Aug 2014 11:45:17 +0200 > > "Michael S. Tsirkin" wrote: > > > > > The function monitor_fdset_dup_fd_find_remove() references member of > > > 'mon_fdse

Re: [Qemu-devel] [PATCH] monitor: fix use after free

2014-08-18 Thread Michael S. Tsirkin
On Mon, Aug 18, 2014 at 02:05:46PM -0400, Luiz Capitulino wrote: > On Sun, 17 Aug 2014 11:45:17 +0200 > "Michael S. Tsirkin" wrote: > > > The function monitor_fdset_dup_fd_find_remove() references member of > > 'mon_fdset' which - when remove flag is set - may be freed in function > > monitor_fds

Re: [Qemu-devel] [PATCH] monitor: fix use after free

2014-08-18 Thread Luiz Capitulino
On Sun, 17 Aug 2014 11:45:17 +0200 "Michael S. Tsirkin" wrote: > The function monitor_fdset_dup_fd_find_remove() references member of > 'mon_fdset' which - when remove flag is set - may be freed in function > monitor_fdset_cleanup(). > remove is set by monitor_fdset_dup_fd_remove which in practic

[Qemu-devel] [PATCH] monitor: fix use after free

2014-08-17 Thread Michael S. Tsirkin
The function monitor_fdset_dup_fd_find_remove() references member of 'mon_fdset' which - when remove flag is set - may be freed in function monitor_fdset_cleanup(). remove is set by monitor_fdset_dup_fd_remove which in practice does not need the returned value, so make it void, and return -1 from m