a55eace nwfilter: Don't have virNWFilterIPAddrMapAddIPAddr consume input

Authored and Committed by John Ferlan 6 years ago
    nwfilter: Don't have virNWFilterIPAddrMapAddIPAddr consume input
    
    On pure success paths, virNWFilterIPAddrMapAddIPAddr was validly
    consuming the input @addr; however, on failure paths it was possible
    that virNWFilterVarValueCreateSimple succeed, but virNWFilterHashTablePut
    failed resulting in virNWFilterVarValueFree being called to clean
    up @val which also cleaned up the input @addr. Thus the caller had
    no way to determine on failure whether it too should clean up the
    passed parameter.
    
    Instead, let's create a copy of the input @addr, then handle that
    properly in the API allowing/forcing the caller to free it's own
    copy of the input parameter.
    
        
file modified
+11 -2