mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemuMonitorTextGetMemoryStats: plug a leak on an error path
* src/qemu/qemu_monitor_text.c (qemuMonitorCommandWithHandler): Always free *reply, upon failure.
This commit is contained in:
parent
1f9da29de1
commit
9827e0a42c
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* qemu_monitor_text.c: interaction with QEMU monitor console
|
||||
*
|
||||
* Copyright (C) 2006-2009 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -235,9 +235,11 @@ qemuMonitorCommandWithHandler(qemuMonitorPtr mon,
|
||||
}
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
virReportSystemError(NULL, msg.lastErrno,
|
||||
_("cannot send monitor command '%s'"), cmd);
|
||||
VIR_FREE(*reply);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user