]> xenbits.xensource.com Git - libvirt.git/commit
qemu: don't leak in qemuGetDHCPInterfaces when failing to alloc
authorChen Hanxiao <chenhanxiao@gmail.com>
Sun, 11 Feb 2018 03:07:10 +0000 (11:07 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 12 Feb 2018 06:57:26 +0000 (07:57 +0100)
commit60a95e524203f70cf49973d6d2fb09807ccb6bb9
tree1ca85c6d974e784ea706f13c9cb6fc0a3c5b7d6e
parenta90a1bf9e12bc23430f23033c671701ce4251cb6
qemu: don't leak in qemuGetDHCPInterfaces when failing to alloc

We forgot to free alloced mem when failed to
dup ifname or macaddr.

Also use VIR_STEAL_PTR to simplify codes.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_agent.c
src/qemu/qemu_driver.c