SVACE issue fix
[platform/core/messaging/msg-service.git] / framework / storage-handler / MsgStorageFolder.cpp
index 1688fec..bf12ef3 100755 (executable)
@@ -133,6 +133,11 @@ msg_error_t MsgStoGetFolderList(msg_struct_list_s *pFolderList)
 
        pFolderList->msg_struct_info = (msg_struct_t *)calloc(rowCnt, sizeof(MSG_FOLDER_INFO_S *));
 
+       if (pFolderList->msg_struct_info == NULL){
+               dbHandle->freeTable();
+               return MSG_ERR_NULL_POINTER;
+       }
+
        msg_struct_s* pTmp = NULL;
 
        for (int i = 0; i < rowCnt; i++) {