From: sooyeon.kim Date: Fri, 3 Feb 2017 05:36:37 +0000 (+0900) Subject: Add null checker before strcmp X-Git-Tag: accepted/tizen/unified/20170406.054054~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bfd134c48f23c41430cc6163e7b62ef6dc6a4410;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Add null checker before strcmp Change-Id: Ia596f10ff6ec3403d2516f811eef628ddf2c8977 Signed-off-by: sooyeon.kim (cherry picked from commit 00f4da760eda5e4e0c1d328f2f9c3d01e3addc58) --- diff --git a/common/vc_info_parser.c b/common/vc_info_parser.c index da0ab55..08db797 100644 --- a/common/vc_info_parser.c +++ b/common/vc_info_parser.c @@ -320,7 +320,7 @@ int vc_info_parser_get_result(char** result_text, int* event, char** result_mess SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Insert db is failed, ret = %d", ret); } - if (!strcmp(temp_text, "#NULL")) { + if (NULL == temp_text || !strcmp(temp_text, "#NULL")) { *result_text = NULL; } else { *result_text = strdup(temp_text);