Really don't crash if a connection closes early
Really don't crash if a connection closes early

CVE-2014-1447

When writing commit 173c291, I missed the fact virNetServerClientClose
unlocks the client object before actually clearing client->sock and thus
it is possible to hit a window when client->keepalive is NULL while
client->sock is not NULL. I was thinking client->sock == NULL was a
better check for a closed connection but apparently we have to go with
client->keepalive == NULL to actually fix the crash.

Signed-off-by: Jiri Denemark <62bdf77dc47919a4d59a91822129d14633cfca81@redhat.com>
(cherry picked from commit 066c8ef6c18bc1faf8b3e10787b39796a7a06cc0)

mithleshvrts/libvirt-0.10.2,mithleshvrts/libvirt-0.10.2,mithleshvrts/libvirt-0.10.2,mithleshvrts/libvirt-0.10.2,mithleshvrts/libvirt-0.10.2