[libvirt] fix for crash in NPIV code

DV found a place in the NPIV code that was freeing the wrong thing in the error case causing a segfault. The patch to fix it follows. Dave diff --git a/src/node_device.c b/src/node_device.c index cd9f0ef..c5b839b 100644 --- a/src/node_device.c +++ b/src/node_device.c @@ -489,8 +489,8 @@ get_wwns(virConnectPtr conn, if (*wwnn == NULL || *wwpn == NULL) { /* Free the other one, if allocated... */ - VIR_FREE(wwnn); - VIR_FREE(wwpn); + VIR_FREE(*wwnn); + VIR_FREE(*wwpn); ret = -1; virReportOOMError(conn); }

On Wed, Jul 01, 2009 at 11:23:53AM -0400, Dave Allan wrote:
DV found a place in the NPIV code that was freeing the wrong thing in the error case causing a segfault. The patch to fix it follows.
ACK from me of course, it really solved a daemon crash for me. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
Dave Allan