]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Fix error path for virPCIGetVirtualFunctions
authorJohn Ferlan <jferlan@redhat.com>
Tue, 17 May 2016 14:31:16 +0000 (10:31 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 19 May 2016 20:30:04 +0000 (16:30 -0400)
commit1f1273c2d1fe71da87f5708c3308bc5fb20aa105
treea7bd3c57fcdb2e9957f730dced84c3fc0c92c760
parentee814d0ec4805bb0663cc0f87a450cb7a59fe6d9
util: Fix error path for virPCIGetVirtualFunctions

If we get to the error: label and clear out the *virtual_functions[]
pointers and then return w/ error to the caller - the caller has it's
own cleanup of the same array in the out: label which is keyed off the
value of num_virt_fns, which wasn't reset to 0 in the called function
leading to a possible problem.

Just clear the value (found by Coverity)

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/util/virpci.c