]> git.ipfire.org Git - thirdparty/libvirt.git/commit
phyp: Fix NULL dereference in phypConnectOpen
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 7 Nov 2014 18:52:33 +0000 (19:52 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 11 Nov 2014 07:23:09 +0000 (08:23 +0100)
commitf9f0f54524f53797b60128d1d11e45d37a694cb2
tree4a38943ab2cc5b095cf6a5e0f0d886aa9a2cbf87
parent72f808c41fcc01f1eb01bde25538638ab7b115a3
phyp: Fix NULL dereference in phypConnectOpen

Coverity found out that commit cd490086 caused a possible NULL pointer
dereference.  This is due to the fact, that phyp_driver is NULL at the
time of closing the socket, instead of connection_data, which kept the
socket before the mentioned commit, could not be NULL.

However, internal_socket is still the local socket that can be
closed, even unconditionally, if we initialize it to -1.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/phyp/phyp_driver.c