It seems libcmpiutil still uses HG, sorry I forgot how to send patch with HG, so
paste the patch directly here and attach the patch generated from "hg export"
as attachement.
exporting patch:
# HG changeset patch
# User Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
# Date 1351243349 -28800
# Node ID 67a7b959ed47188efb8eb2f462bc7fc9ee145041
# Parent 2984ede9c082bab48b3494ef4b9f5561fadef2ad
fix potential crash bug
diff -r 2984ede9c082 -r 67a7b959ed47 std_indication.c
--- a/std_indication.c Tue May 24 10:45:46 2011 -0400
+++ b/std_indication.c Fri Oct 26 17:22:29 2012 +0800
@@ -141,7 +141,12 @@
enabled = is_ind_enabled(ctx, ind_name, &s);
if (s.rc != CMPI_RC_OK) {
- CU_DEBUG("Problem checking enabled: '%s'",
CMGetCharPtr(s.msg));
+ if (s.msg != NULL) {
+ CU_DEBUG("Problem checking enabled: '%s'",
+ CMGetCharPtr(s.msg));
+ } else {
+ CU_DEBUG("Problem checking enabled, msg is NULL");
+ }
goto out;
}
@@ -176,7 +181,12 @@
enabled = is_ind_enabled(args->_ctx, ind_name, &s);
if (s.rc != CMPI_RC_OK) {
- CU_DEBUG("Problem checking enabled: '%s'",
CMGetCharPtr(s.msg));
+ if (s.msg != NULL) {
+ CU_DEBUG("Problem checking enabled: '%s'",
+ CMGetCharPtr(s.msg));
+ } else {
+ CU_DEBUG("Problem checking enabled, msg is NULL");
+ }
goto out;
}