[libvirt] [PATCH 13/17] Fix leak of command line args in qemuParseCommandLine
Ján Tomko
jtomko at redhat.com
Wed Sep 25 08:32:04 UTC 2013
On 09/24/2013 06:04 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> If qemuParseCommandLine finds an arg it does not understand
> it adds it to the QEMU passthrough custom arg list. If the
> qemuParseCommandLine method hits an error for any reason
> though, it just does 'VIR_FREE(cmd)' on the custom arg list.
> This means all actual args / env vars are leaked. Introduce
> a qemuDomainCmdlineDefFree method to be used for cleanup.
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/qemu/qemu_command.c | 4 ++--
> src/qemu/qemu_conf.c | 18 ++++++++++++++++++
> src/qemu/qemu_conf.h | 2 ++
> src/qemu/qemu_domain.c | 15 +--------------
> 4 files changed, 23 insertions(+), 16 deletions(-)
ACK
More information about the libvir-list
mailing list