qemuProcessWaitForMonitor: Automatically free GHashTable

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Peter Krempa 2021-11-30 11:49:24 +01:00
parent 6e9ddad43b
commit 7ef8e9af6f
1 changed files with 1 additions and 3 deletions

View File

@ -2395,7 +2395,7 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver,
qemuDomainLogContext *logCtxt)
{
int ret = -1;
GHashTable *info = NULL;
g_autoptr(GHashTable) info = NULL;
qemuDomainObjPrivate *priv = vm->privateData;
bool retry = true;
@ -2427,8 +2427,6 @@ qemuProcessWaitForMonitor(virQEMUDriver *driver,
}
cleanup:
virHashFree(info);
if (logCtxt && kill(vm->pid, 0) == -1 && errno == ESRCH) {
qemuProcessReportLogError(logCtxt,
_("process exited while connecting to monitor"));