]> xenbits.xensource.com Git - libvirt.git/commit
libvir.c: avoid NULL dereference in virStoragePoolSetAutostart
authorJim Meyering <meyering@redhat.com>
Wed, 2 Sep 2009 15:47:51 +0000 (17:47 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 3 Sep 2009 16:04:23 +0000 (18:04 +0200)
commitd9b4538469bfa480e22b504c896c13cdcde5e31a
tree3e0697a5965247a168adcb1d5c9f0272940b8744
parent1f5e29252002c4110f568ea15e21f931b388bdef
libvir.c: avoid NULL dereference in virStoragePoolSetAutostart

* src/libvirt.c (virStoragePoolSetAutostart): Return -1 if the pool
argument is invalid, rather than "goto error" where we could dereference
that possibly-NULL "pool".
(virConnectFindStoragePoolSources): Likewise.
(virConnectNumOfDomains): Likewise.
Daniel P. Berrange spotted that the two latter functions
needed the same treatment.
src/libvirt.c