summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-11-21 18:41:47 +0000
committerBenny Prijono <bennylp@teluu.com>2006-11-21 18:41:47 +0000
commitc9240f4a374a9a8f238f11e7b17fcdf6761f227e (patch)
treef394be522b5b4914c4fd3a905d7f6f6911ff0bef
parentd262e04a707fc8fa784a90c943c9fe21e8d12b1d (diff)
Fixed mutex leak in SIP endpoint: timer heap was not destroyed
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@818 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsip/sip_endpoint.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pjsip/src/pjsip/sip_endpoint.c b/pjsip/src/pjsip/sip_endpoint.c
index 5586d305..2dd872f4 100644
--- a/pjsip/src/pjsip/sip_endpoint.c
+++ b/pjsip/src/pjsip/sip_endpoint.c
@@ -541,6 +541,10 @@ on_error:
pj_ioqueue_destroy(endpt->ioqueue);
endpt->ioqueue = NULL;
}
+ if (endpt->timer_heap) {
+ pj_timer_heap_destroy(endpt->timer_heap);
+ endpt->timer_heap = NULL;
+ }
if (endpt->mutex) {
pj_mutex_destroy(endpt->mutex);
endpt->mutex = NULL;
@@ -578,6 +582,9 @@ PJ_DEF(void) pjsip_endpt_destroy(pjsip_endpoint *endpt)
/* Destroy ioqueue */
pj_ioqueue_destroy(endpt->ioqueue);
+ /* Destroy timer heap */
+ pj_timer_heap_destroy(endpt->timer_heap);
+
/* Delete endpoint mutex. */
pj_mutex_destroy(endpt->mutex);