diff options
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r-- | res/res_pjsip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 9970d84f4..92dca7fb8 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -4409,8 +4409,13 @@ static int unload_pjsip(void *data) } if (memory_pool) { - pj_pool_release(memory_pool); + /* This mimics the behavior of pj_pool_safe_release + * which was introduced in pjproject 2.6. + */ + pj_pool_t *temp_pool = memory_pool; + memory_pool = NULL; + pj_pool_release(temp_pool); } ast_pjsip_endpoint = NULL; |