]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh-nodedev: Avoid spurious errors
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Jun 2014 14:48:22 +0000 (16:48 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 2 Jun 2014 16:09:09 +0000 (18:09 +0200)
commit289a3163de9378ea5c7321ac44b7b34bf4806ea5
treedef21a36614f793ffd1c3c0d5456ad0e46194e1f
parent819ca36e2b65a0a34263547161a98cec497780c8
virsh-nodedev: Avoid spurious errors

Our public free functions explicitly don't accept NULL pointers
(sigh). Therefore, callers must do something like this:

    if (dev)
        virNodeDeviceFree(dev);

And we are not doing that on two places I've found. This leads to
dummy error message thrown by virsh:

    virsh # nodedev-dumpxml nonexistent-device
    error: Could not find matching device 'nonexistent-device'
    error: invalid node device pointer in virNodeDeviceFree

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
tools/virsh-nodedev.c