Re: [libvirt] [PATCH] qemu: don't leak in qemuGetDHCPInterfaces when failing to alloc

2018-02-11 Thread Michal Privoznik
On 02/11/2018 04:07 AM, Chen Hanxiao wrote: > From: Chen Hanxiao > > 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 > --- > src/qemu/qemu_agent.c

[libvirt] [PATCH] qemu: don't leak in qemuGetDHCPInterfaces when failing to alloc

2018-02-10 Thread Chen Hanxiao
From: Chen Hanxiao 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 --- src/qemu/qemu_agent.c | 3 +-- src/qemu/qemu_driver.c | 7 +++ 2 files changed,