diff --git a/daemon/admin_server.c b/daemon/admin_server.c index 85cec4627c8ac3ef15fed78856e95ea3b40a5921..1d30ea50792d7c060ad49194e21fa7498860f8a6 100644 --- a/daemon/admin_server.c +++ b/daemon/admin_server.c @@ -54,7 +54,8 @@ adminConnectListServers(virNetDaemonPtr dmn, srvs = NULL; } cleanup: - virObjectListFreeCount(srvs, ret); + if (ret > 0) + virObjectListFreeCount(srvs, ret); return ret; }