1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-28 11:21:44 +03:00
libvirt/daemon
Michal Privoznik 702713af5a adminDaemonListServers: Don't leak @srv_names array
When getting a list of servers registered for a daemon, it's
returned as a dynamically allocated array filled in with pointers
to constant strings. Because the array is dynamic, it should be
freed when no longer needed (but not the strings!). Even the
function that creates the array suggests that.

==19446== 48 bytes in 3 blocks are definitely lost in loss record 821 of 1,034
==19446==    at 0x4C2C28E: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==19446==    by 0x54BAFC8: virReallocN (viralloc.c:245)
==19446==    by 0x54BB0BE: virExpandN (viralloc.c:294)
==19446==    by 0x54BB391: virInsertElementsN (viralloc.c:436)
==19446==    by 0x164E3D: virNetDaemonGetServerNames (virnetdaemon.c:217)
==19446==    by 0x15616F: adminDaemonListServers (admin_server.c:52)
==19446==    by 0x155B8C: adminDispatchConnectListServers (admin.c:151)
==19446==    by 0x155FD8: adminDispatchConnectListServersHelper (admin_dispatch.h:101)
==19446==    by 0x568E862: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
==19446==    by 0x568E3C3: virNetServerProgramDispatch (virnetserverprogram.c:307)
==19446==    by 0x5687B5B: virNetServerProcessMsg (virnetserver.c:135)
==19446==    by 0x5687C1B: virNetServerHandleJob (virnetserver.c:156)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-02-22 07:25:18 +01:00
..
admin_server.c adminDaemonListServers: Don't leak @srv_names array 2016-02-22 07:25:18 +01:00
admin_server.h admin: Introduce adminDaemonConnectListServers API 2016-02-17 12:46:34 +01:00
admin.c admin: Introduce adminDaemonConnectListServers API 2016-02-17 12:46:34 +01:00
admin.h admin: Move admin_server.{h,c} to admin.{h,c} 2016-02-17 12:46:34 +01:00
libvirt.rules polkit: Allow password-less access for 'libvirt' group 2015-05-04 12:57:06 -04:00
libvirtd-config.c rpc: Remove keepalive_required option 2015-08-10 13:15:56 +02:00
libvirtd-config.h rpc: Remove keepalive_required option 2015-08-10 13:15:56 +02:00
libvirtd.aug Add configuration options for permissions on daemon's admin socket 2015-06-16 13:46:21 +02:00
libvirtd.c admin: Move admin_server.{h,c} to admin.{h,c} 2016-02-17 12:46:34 +01:00
libvirtd.conf docs: update to properly reflect meaning of fields in log filter 2016-01-04 15:19:38 -05:00
libvirtd.h rpc: Remove keepalive_required option 2015-08-10 13:15:56 +02:00
libvirtd.init.in Fix LSB requirements in service script and sync them 2016-01-11 15:49:13 +01:00
libvirtd.libxl.logrotate.in libxl: add logrotate config file 2015-05-05 09:08:11 -06:00
libvirtd.logrotate.in Add logrotate support for libvirtd.log 2011-03-04 22:43:55 +08:00
libvirtd.lxc.logrotate.in Change logrotate to be per-hypervisor logs 2010-03-10 11:27:02 +01:00
libvirtd.pod.in Properly handle -h / -V for --help/--version aliases in virtlockd/libvirtd 2013-08-13 14:06:01 +01:00
libvirtd.policy.in daemon: Make the default PolicyKit policy auth_admin_keep. 2012-11-01 13:17:26 +00:00
libvirtd.qemu.logrotate.in Change logrotate to be per-hypervisor logs 2010-03-10 11:27:02 +01:00
libvirtd.sasl daemon: Fix command example in libvirtd.sasl 2013-07-09 10:01:55 -04:00
libvirtd.service.in libvirtd: enable virtlockd/virtlogd socket activation on install 2015-12-07 17:32:49 +00:00
libvirtd.socket.in daemon: use socket activation with systemd 2014-08-22 09:12:14 +02:00
libvirtd.sysconf daemon: Enhance documentation for changing NOFILE limit 2014-03-20 10:55:44 +01:00
libvirtd.sysctl init: raise default system aio limits 2011-10-05 14:49:35 -06:00
libvirtd.uml.logrotate.in Change logrotate to be per-hypervisor logs 2010-03-10 11:27:02 +01:00
libvirtd.upstart daemon: Allow overriding NOFILES ulimit for the daemon as well 2012-02-01 16:04:30 +01:00
Makefile.am admin: Introduce adminDaemonConnectListServers API 2016-02-17 12:46:34 +01:00
remote.c util: Export remoteSerializeTypedParameters internally via util 2016-02-03 15:46:45 +01:00
remote.h Implement the RPC protocol for the libvirt-lxc.la library 2013-01-15 18:16:53 +00:00
stream.c Replace virStreamFree with virObjectUnref 2014-12-02 11:03:41 -05:00
stream.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
test_libvirtd.aug.in rpc: Remove keepalive_required option 2015-08-10 13:15:56 +02:00
THREADS.txt docs: fix usage of 'onto' 2013-04-19 14:31:16 -06:00