]> xenbits.xensource.com Git - libvirt.git/commit
daemon: Add the admin service to the admin server only if it was allocated
authorPeter Krempa <pkrempa@redhat.com>
Thu, 18 Jun 2015 09:40:08 +0000 (11:40 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 18 Jun 2015 11:32:37 +0000 (13:32 +0200)
commitd7d910d98de24dcc5fe3acfb2d37b6258f87ddfe
tree11d0f914f8d23f44df8c16127ba6a71d6c084517
parent4002395dd7180158aa32adc31ab61a2f155380df
daemon: Add the admin service to the admin server only if it was allocated

If the admin service is disabled it would not be allocated, but the NULL
pointer still would be added to the admin server. Since
virNetServerAddService would dereference it, the daemon would crash.

Move the service registration into the block that allocates it.
daemon/libvirtd.c