Fixed Svace issues 77/199877/2 accepted/tizen/unified/20190218.064045 submit/tizen/20190216.112418
authorkamaljeet <kamal.jc@samsung.com>
Fri, 15 Feb 2019 06:31:09 +0000 (12:01 +0530)
committerrandeep singh <randeep.s@samsung.com>
Fri, 15 Feb 2019 14:22:59 +0000 (14:22 +0000)
Change-Id: Iafaad19e04eac7c85bd354784206d8ce36b210ef
Signed-off-by: kamaljeet <kamal.jc@samsung.com>
server/db/ctsvc_db_query.c

index cad20ae..6cb3746 100644 (file)
@@ -2036,6 +2036,10 @@ static int __db_append_search_query(const char *keyword, char **query, int *quer
                                break;
                        int len_keyword = strlen(half_keyword);
                        char *clean_number = calloc(len_keyword + 1, sizeof(char));
+                       if(clean_number == NULL) {
+                               ERR("Memory allocation failure ");
+                               break;
+                       }
                        int err = ctsvc_clean_number(half_keyword, clean_number, len_keyword + 1, false);
                        if (err <= 0) {
                                /* LCOV_EXCL_START */