1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

phyp: Resolve Coverity FORWARD_NULL

Commit id 'cd490086' added a VIR_FORCE_CLOSE of the 'sock', but it
was after the VIR_FREE() of phyp_driver, resulting in a possible/likely
NULL dereference.

Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
John Ferlan 2015-07-01 06:32:34 -04:00
parent c50c664de5
commit 78f1aca076

View File

@ -1249,9 +1249,8 @@ phypConnectClose(virConnectPtr conn)
virObjectUnref(phyp_driver->xmlopt);
phypUUIDTable_Free(phyp_driver->uuid_table);
VIR_FREE(phyp_driver->managed_system);
VIR_FREE(phyp_driver);
VIR_FORCE_CLOSE(phyp_driver->sock);
VIR_FREE(phyp_driver);
return 0;
}