mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-04 15:43:09 +00:00
Fix minor leaks caused by not calling pthread_mutex_destroy throughout the tree.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1412 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
ba24191073
commit
9d27cc2f35
@ -375,7 +375,8 @@ static void conn_info_destroy (struct conn_info *conn_info)
|
||||
|
||||
pthread_attr_destroy (&conn_info->thread_attr);
|
||||
pthread_mutex_destroy (&conn_info->mutex);
|
||||
|
||||
pthread_mutex_destroy (&conn_info->flow_control_mutex);
|
||||
|
||||
list_del (&conn_info->list);
|
||||
free (conn_info);
|
||||
}
|
||||
|
@ -101,6 +101,10 @@ static struct saVersionDatabase amfVersionDatabase = {
|
||||
|
||||
void amfHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
struct amfInstance *amfInstance = instance;
|
||||
|
||||
pthread_mutex_destroy (&amfInstance->response_mutex);
|
||||
pthread_mutex_destroy (&amfInstance->dispatch_mutex);
|
||||
}
|
||||
|
||||
SaAisErrorT
|
||||
|
@ -89,6 +89,10 @@ static struct saHandleDatabase cfg_hdb = {
|
||||
*/
|
||||
void cfg_handleInstanceDestructor (void *instance)
|
||||
{
|
||||
struct cfg_instance *cfg_instance = instance;
|
||||
|
||||
pthread_mutex_destroy (&cfg_instance->response_mutex);
|
||||
pthread_mutex_destroy (&cfg_instance->dispatch_mutex);
|
||||
}
|
||||
|
||||
SaAisErrorT
|
||||
|
11
lib/ckpt.c
11
lib/ckpt.c
@ -155,15 +155,24 @@ struct iteratorSectionIdListEntry {
|
||||
*/
|
||||
void ckptHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
struct ckptInstance *ckptInstance = instance;
|
||||
|
||||
pthread_mutex_destroy (&ckptInstance->response_mutex);
|
||||
pthread_mutex_destroy (&ckptInstance->dispatch_mutex);
|
||||
}
|
||||
|
||||
void checkpointHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
return;
|
||||
struct ckptCheckpointInstance *checkpointInstance = instance;
|
||||
|
||||
pthread_mutex_destroy (&checkpointInstance->response_mutex);
|
||||
}
|
||||
|
||||
void ckptSectionIterationHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
struct ckptSectionIterationInstance *iterationInstance = instance;
|
||||
|
||||
pthread_mutex_destroy (&iterationInstance->response_mutex);
|
||||
}
|
||||
|
||||
static void ckptSectionIterationInstanceFinalize (struct ckptSectionIterationInstance *ckptSectionIterationInstance)
|
||||
|
@ -93,6 +93,10 @@ static struct saVersionDatabase clmVersionDatabase = {
|
||||
|
||||
void clmHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
struct clmInstance *clmInstance = instance;
|
||||
|
||||
pthread_mutex_destroy (&clmInstance->response_mutex);
|
||||
pthread_mutex_destroy (&clmInstance->dispatch_mutex);
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,6 +76,10 @@ static struct saHandleDatabase cpg_handle_t_db = {
|
||||
*/
|
||||
static void cpg_instance_destructor (void *instance)
|
||||
{
|
||||
struct cpg_inst *cpg_inst = instance;
|
||||
|
||||
pthread_mutex_destroy (&cpg_inst->response_mutex);
|
||||
pthread_mutex_destroy (&cpg_inst->dispatch_mutex);
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,6 +81,10 @@ static struct saHandleDatabase evs_handle_t_db = {
|
||||
*/
|
||||
static void evs_instance_destructor (void *instance)
|
||||
{
|
||||
struct evs_inst *evs_inst = instance;
|
||||
|
||||
pthread_mutex_destroy (&evs_inst->response_mutex);
|
||||
pthread_mutex_destroy (&evs_inst->dispatch_mutex);
|
||||
}
|
||||
|
||||
|
||||
|
@ -244,6 +244,9 @@ static void evtHandleInstanceDestructor(void *instance)
|
||||
saHandleDestroy(&channel_handle_db, handle);
|
||||
saHandleInstancePut(&channel_handle_db, handle);
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&evti->ei_dispatch_mutex);
|
||||
pthread_mutex_destroy(&evti->ei_response_mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -271,6 +274,7 @@ static void chanHandleInstanceDestructor(void *instance)
|
||||
saEvtEventFree(handle);
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&eci->eci_mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -295,6 +299,8 @@ static void eventHandleInstanceDestructor(void *instance)
|
||||
if (edi->edi_event_data) {
|
||||
free(edi->edi_event_data);
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&edi->edi_mutex);
|
||||
}
|
||||
|
||||
static SaAisErrorT evt_recv_event(int fd, struct lib_event_data **msg)
|
||||
|
@ -143,11 +143,14 @@ static struct saVersionDatabase lckVersionDatabase = {
|
||||
*/
|
||||
void lckHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
struct lckInstance *lckInstance = instance;
|
||||
|
||||
pthread_mutex_destroy (&lckInstance->response_mutex);
|
||||
pthread_mutex_destroy (&lckInstance->dispatch_mutex);
|
||||
}
|
||||
|
||||
void lckResourceHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void lckResourceHandleLockIdInstanceDestructor (void *instance)
|
||||
|
@ -130,11 +130,14 @@ struct iteratorSectionIdListEntry {
|
||||
*/
|
||||
void msgHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
struct msgInstance *msgInstance = instance;
|
||||
|
||||
pthread_mutex_destroy (&msgInstance->response_mutex);
|
||||
pthread_mutex_destroy (&msgInstance->dispatch_mutex);
|
||||
}
|
||||
|
||||
void queueHandleInstanceDestructor (void *instance)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef COMPILE_OUT
|
||||
|
Loading…
Reference in New Issue
Block a user