summaryrefslogtreecommitdiff
path: root/res/res_pjsip_history.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_pjsip_history.c')
-rw-r--r--res/res_pjsip_history.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_pjsip_history.c b/res/res_pjsip_history.c
index 651f19dea..0b50f6817 100644
--- a/res/res_pjsip_history.c
+++ b/res/res_pjsip_history.c
@@ -608,8 +608,13 @@ static void pjsip_history_entry_dtor(void *obj)
struct pjsip_history_entry *entry = obj;
if (entry->pool) {
- pj_pool_release(entry->pool);
+ /* This mimics the behavior of pj_pool_safe_release
+ * which was introduced in pjproject 2.6.
+ */
+ pj_pool_t *temp_pool = entry->pool;
+
entry->pool = NULL;
+ pj_pool_release(temp_pool);
}
}