6209bb3 nwfilter: Fix possible segfault on sometimes consumed variable

Authored and Committed by John Ferlan 6 years ago
    nwfilter: Fix possible segfault on sometimes consumed variable
    
    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.