diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c index 0909b4da3d..ce5349bd71 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -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; }