]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: check the return value of virStoragePoolGetAutostart
authorJán Tomko <jtomko@redhat.com>
Fri, 30 Nov 2012 12:09:21 +0000 (13:09 +0100)
committerCole Robinson <crobinso@redhat.com>
Sun, 9 Dec 2012 21:53:41 +0000 (16:53 -0500)
commit9720cc8195a106c8f36414ba919ef9080a1b49e4
tree84a18d6bb7eebdb98ed7273dd9b00a4aa121f64d
parent2f4d266d1fad1905c7914761fd219884bd62e75e
virsh: check the return value of virStoragePoolGetAutostart

On error, virStoragePoolGetAutostart would return -1 leaving autostart
untouched.

Removed the misleading debug message as well.

Error: CHECKED_RETURN (CWE-252):
libvirt-0.10.2/tools/virsh-pool.c:1386: unchecked_value: No check of the
    return value of "virStoragePoolGetAutostart(pool, &autostart)".
(cherry picked from commit e9d74a7a8238f082cf0f0285ce4d2547a72eaa01)
tools/virsh-pool.c