PengZheng commented on code in PR #551: URL: https://github.com/apache/celix/pull/551#discussion_r1192962350
########## bundles/remote_services/remote_service_admin_shm_v2/rsa_shm/src/rsa_shm_client.c: ########## @@ -178,14 +179,8 @@ void rsaShmClientManager_destroy(rsa_shm_client_manager_t *clientManager) { celixThreadMutex_unlock(&clientManager->exceptionMsgListMutex); (void)celixThreadCondition_signal(&clientManager->exceptionMsgListNotEmpty); celixThread_join(clientManager->msgExceptionHandlerThread, NULL); - size_t listSize = celix_arrayList_size(clientManager->exceptionMsgList); - for (int i = 0; i < listSize; ++i) { - rsa_shm_exception_msg_t *exceptionMsg = celix_arrayList_get(clientManager->exceptionMsgList, i); - //Here,we should not free 'msgBuffer' and 'msgCtrl' by shmPool_free, because rsa_shm_server maybe using them, and tlsf_free will modify freed memory. - //The shared memory of 'msgBuffer' and 'msgCtrl' will be freed automatically when nobody is using it. - free(exceptionMsg->peerServerName); - free(exceptionMsg); Review Comment: This should not be a bug. I have closed #540, check it for explanation. Feel free to recover the previous implementation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org