Re: [PATCH] Fix leak of iterator in nwfilter instantiate code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 17, 2014 at 11:40:39AM +0000, Daniel P. Berrange wrote:
> The ebiptablesCreateRuleInstanceIterate creates a
> virNWFilterVarCombIterPtr instance and iterates over
> it. Unfortunately in doing so, it discards the original
> pointer. At the end of the method it will thus effectively
> do virNWFilterVarCombIterFree(NULL), which means it will
> leak the iterator.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/nwfilter/nwfilter_ebiptables_driver.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Opps, this is wrong. The virNWFilterVarCombIterNext method
will bizarely  free its input parameter at the end. I'll
send a different patch to give this saner semantics.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]