]> 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)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 30 Nov 2012 14:35:14 +0000 (15:35 +0100)
commite9d74a7a8238f082cf0f0285ce4d2547a72eaa01
tree1bc8c4f2b751270ebbd61e64dff8cfa6503b02dc
parent6c5c4b8d4d0a7f8912c679d582cc323e1b90b7f0
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)".
tools/virsh-pool.c