]> xenbits.xensource.com Git - libvirt.git/commitdiff
nodedev: Free the right pointers when getting WWNs fails
authorJiri Denemark <jdenemar@redhat.com>
Tue, 17 Aug 2010 15:49:12 +0000 (17:49 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 18 Aug 2010 15:32:31 +0000 (17:32 +0200)
src/conf/node_device_conf.c

index 6583570d05fbf147eefbf38ab97412a6e22aa0d5..0b080ce70d578d2cae9a83007bcc3970be2e4b72 100644 (file)
@@ -1283,8 +1283,8 @@ virNodeDeviceGetWWNs(virNodeDeviceDefPtr def,
         ret = -1;
     } else 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();
     }