1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

rpc: fix resource leak

Commit 252610f7dd1 switched to use hash to store servers.
Function virHashGetItems returns allocated array which needs
to be freed also for successful path, not only if there is
an error.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit ab0a461b8c873e9b4999ed627bc8ce01d0105268)
This commit is contained in:
Pavel Hrdina 2017-04-09 12:55:09 +02:00 committed by Cole Robinson
parent c714afcc99
commit e675e874fa

View File

@ -401,6 +401,7 @@ virNetDaemonPreExecRestart(virNetDaemonPtr dmn)
}
}
VIR_FREE(srvArray);
virObjectUnlock(dmn);
return object;