a71fd23 qemu: eliminate memory leaks when converting NetDefs to type='ethernet'

Authored and Committed by Laine Stump 7 years ago
    qemu: eliminate memory leaks when converting NetDefs to type='ethernet'
    
    in qemuConnectDomainXMLToNative. This function was only accounting for
    about 1/10 of all the allocated items in the NetDef prior to memseting
    it to all 0's. On top of that, it was going to great pains to learn
    the name of the bridge device, but then never doing anything useful
    with it (just putting it into data.ethernet.dev, which is *never* used
    when building a qemu commandline). (I think this again all started off
    as code with good intentions, but it was never completed, and instead
    was just Frankensteinically cargo-culted into the odd mish mash we
    have today).
    
    The resulting code is much simpler, produces exactly the same output,
    and doesn't leak memory.
    
        
file modified
+6 -50