[libvirt] [PATCH 1/5]: Shore up virGetLastError handling

Chris Lalancette clalance at redhat.com
Tue Oct 21 13:56:48 UTC 2008


While doing testing on this patch series, I mistakenly added a bogus piece of
storage XML to libvirtd, which was saved in /etc/libvirt/storage.  On subsequent
stop/start of libvirtd, because of another bug (fixed in a later patch), an
error wasn't being set properly in an error path, so libvirtd was SEGV'ing in
storage_conf.c:virStoragePoolObjLoad when trying to dereference the NULL err
returned from virGetLastError().  Make this more robust against errors by always
doing "err ? err->message : NULL" in the printf.  I looked around the tree and
found a couple of other places that weren't guarded, so this patch fixes them as
well.

Signed-off-by: Chris Lalancette <clalance at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-logical-rewrite-pool-sources-v3-patch1.patch
Type: text/x-patch
Size: 2583 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081021/cd39cbcb/attachment-0001.bin>


More information about the libvir-list mailing list