diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-11-21 08:37:17 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-11-21 08:37:17 +0000 |
commit | 3db1d26bb8fce05a82efee42cf48fc50a8307c8d (patch) | |
tree | 3cf808f1ef77c94470f16e22ad61f70752f78d06 /pjsip/src | |
parent | a4369b0fa250d67075acfdd711599fa2c4620cc3 (diff) |
Fixed handles leak in SIP endpoint: ioqueue is not freed, causing PJ_IOQUEUE_MAX_HANDLES mutex to leak during program exits
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@810 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsip/sip_endpoint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pjsip/src/pjsip/sip_endpoint.c b/pjsip/src/pjsip/sip_endpoint.c index 18345725..2d61e6b9 100644 --- a/pjsip/src/pjsip/sip_endpoint.c +++ b/pjsip/src/pjsip/sip_endpoint.c @@ -537,6 +537,10 @@ on_error: pjsip_tpmgr_destroy(endpt->transport_mgr); endpt->transport_mgr = NULL; } + if (endpt->ioqueue) { + pj_ioqueue_destroy(endpt->ioqueue); + endpt->ioqueue = NULL; + } if (endpt->mutex) { pj_mutex_destroy(endpt->mutex); endpt->mutex = NULL; @@ -571,6 +575,9 @@ PJ_DEF(void) pjsip_endpt_destroy(pjsip_endpoint *endpt) /* Shutdown and destroy all transports. */ pjsip_tpmgr_destroy(endpt->transport_mgr); + /* Destroy ioqueue */ + pj_ioqueue_destroy(endpt->ioqueue); + /* Delete endpoint mutex. */ pj_mutex_destroy(endpt->mutex); |