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

snmishra at linux.vnet.ibm.com snmishra at linux.vnet.ibm.com
Tue Oct 30 21:52:00 UTC 2012


+1

Sharad Mishra
Quoting Wenchao Xia <xiawenc at linux.vnet.ibm.com>:

> Signed-off-by: Wenchao Xia <xiawenc at linux.vnet.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