Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > ebe084c140192657f9094e135a84202c > files > 93

libvirt-0.8.2-29.el5.src.rpm

From 2684f539d3571f15afb8ab293903eaf2ab2d746d Mon Sep 17 00:00:00 2001
Message-Id: <2684f539d3571f15afb8ab293903eaf2ab2d746d.1283420933.git.jdenemar@redhat.com>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Tue, 17 Aug 2010 17:49:12 +0200
Subject: [PATCH] nodedev: Free the right pointers when getting WWNs fails

(cherry picked from commit 47c74e8264ba4ddbee5dd93be6cc21dd87539bf3)
---
 src/conf/node_device_conf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 6583570..0b080ce 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -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();
     }
-- 
1.7.2.2