[Libvirt-cim] [PATCH V5 09/15] RASDIndication, fix debug print crash

Wenchao Xia xiawenc at linux.vnet.ibm.com
Thu Mar 21 03:39:12 UTC 2013


Signed-off-by: Wenchao Xia <xiawenc at linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan at redhat.com>
Reviewed-by: Sharad Mishra <snmishra at us.ibm.com>
---
 src/Virt_ResourceAllocationSettingDataIndication.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/Virt_ResourceAllocationSettingDataIndication.c b/src/Virt_ResourceAllocationSettingDataIndication.c
index a386132..93fb563 100644
--- a/src/Virt_ResourceAllocationSettingDataIndication.c
+++ b/src/Virt_ResourceAllocationSettingDataIndication.c
@@ -122,7 +122,11 @@ static CMPIStatus raise_indication(const CMPIBroker *broker,
         if (s.rc == CMPI_RC_OK) {
                 CU_DEBUG("Indication delivered");
         } else {
-                CU_DEBUG("Not delivered: %s", CMGetCharPtr(s.msg));
+                if (s.msg == NULL) {
+                        CU_DEBUG("Not delivered: msg is NULL.");
+                } else {
+                        CU_DEBUG("Not delivered: %s", CMGetCharPtr(s.msg));
+                }
         }
 
  out:
-- 
1.7.1





More information about the Libvirt-cim mailing list