diff options
author | randeep singh <randeep.s@samsung.com> | 2019-02-16 15:28:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2019-02-16 15:28:46 +0000 |
commit | 61a80424d33161afe8639af73d8ab1930c7dc9e3 (patch) | |
tree | e473726b6b809c8f862436f5b99ac1f25b9a9bfe | |
parent | b797d948a06f6b91718773606addda16b8f50bbd (diff) | |
parent | 3c24315dc3c53bea9230daa99c9b4c8c38779c39 (diff) | |
download | msg-service-61a80424d33161afe8639af73d8ab1930c7dc9e3.tar.gz msg-service-61a80424d33161afe8639af73d8ab1930c7dc9e3.tar.bz2 msg-service-61a80424d33161afe8639af73d8ab1930c7dc9e3.zip |
Merge "svace issues" into tizensubmit/tizen/20190216.152911accepted/tizen/unified/20190218.064114
-rwxr-xr-x | utils/MsgUtilFile.cpp | 2 | ||||
-rwxr-xr-x | utils/MsgUtilStorage.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/utils/MsgUtilFile.cpp b/utils/MsgUtilFile.cpp index c748e0e..7285d6e 100755 --- a/utils/MsgUtilFile.cpp +++ b/utils/MsgUtilFile.cpp @@ -355,7 +355,7 @@ bool MsgCreateFileName(char *pFileName) bool MsgOpenAndReadFile(const char *pFileName, char **ppData, int *pDataSize) { if (!pFileName || !ppData || !pDataSize) { - MSG_ERR("Invalid params!! pFileName=%s, ppData=%s, pDataSize=%p", pFileName, *ppData, (void *)pDataSize); + MSG_ERR("Invalid params"); return false; } diff --git a/utils/MsgUtilStorage.cpp b/utils/MsgUtilStorage.cpp index 0f2e607..b025f95 100755 --- a/utils/MsgUtilStorage.cpp +++ b/utils/MsgUtilStorage.cpp @@ -1319,6 +1319,16 @@ msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, msg_thread memset(sqlQuery, 0x00, sizeof(sqlQuery)); snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET DISPLAY_NAME = ? WHERE CONV_ID = %d;", MSGFW_CONVERSATION_TABLE_NAME, convId); + + for (int j = 0; j < addressList.nCount; j++) { + msg_struct_s *pStruct = (msg_struct_s *)addressList.msg_struct_info[j]; + delete (MSG_ADDRESS_INFO_S *)pStruct->data; + delete (msg_struct_s *)pStruct; + } + + if (addressList.msg_struct_info != NULL) { + g_free((msg_struct_t *)addressList.msg_struct_info); + } if (pDbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) { MSG_DEBUG("Query Failed [%s]", sqlQuery); @@ -1335,16 +1345,6 @@ msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, msg_thread pDbHandle->finalizeQuery(); - for (int j = 0; j < addressList.nCount; j++) { - msg_struct_s *pStruct = (msg_struct_s *)addressList.msg_struct_info[j]; - delete (MSG_ADDRESS_INFO_S *)pStruct->data; - delete (msg_struct_s *)pStruct; - } - - if (addressList.msg_struct_info != NULL) { - g_free((msg_struct_t *)addressList.msg_struct_info); - } - return err; } |