]> xenbits.xensource.com Git - libvirt.git/commit
admin_server: Avoid accessing unallocated memory
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 25 Mar 2016 09:18:00 +0000 (10:18 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 25 Mar 2016 09:18:00 +0000 (10:18 +0100)
commitd715bfac08aa7b062d3010442637c9e63e7ab91e
tree2512be7c84c5a386ed770ebd8076a3372c2ce6d2
parent3e5b35a538f507ed23d4130b6aa5dfcee28b7c67
admin_server: Avoid accessing unallocated memory

In 68b726b93c11cc90 we tried to fix a mem leak. However, it
wasn't done quite well. Problem is, virNetDaemonGetServers() may
fail in which case virObjectListFreeCount() would be called with
-1 objects to free. But the number of elements is taken in
unsigned rather than signed integer.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
daemon/admin_server.c