On Wed, Sep 27, 2017 at 10:22:17AM -0400, John Ferlan wrote: > The virNWFilterIPAddrMapAddIPAddr code can consume the @addr parameter > on success when the @ifname is found in the ipAddressMap->hashTable > hash table in the call to virNWFilterVarValueAddValue; however, if > not found in the hash table, then @addr is formatted into a @val > which is stored in the table and on return the caller would be > expected to free @addr. > > Thus, the caller has no way to determine on success whether @addr was > consumed, so in order to fix this create a @tmp variable which will > be stored/consumed when virNWFilterVarValueAddValue succeeds. That way > the caller can free @addr whether the function returns success or failure. > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx> -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list