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);
     }

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to