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.
Showing
想要评论请 注册 或 登录