* src/qemu/qemu_monitor_text.c (qemuMonitorCommandWithHandler):
Always free *reply, upon failure.
/*
* 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
}
}
- if (ret < 0)
+ if (ret < 0) {
virReportSystemError(NULL, msg.lastErrno,
_("cannot send monitor command '%s'"), cmd);
+ VIR_FREE(*reply);
+ }
return ret;
}