summaryrefslogtreecommitdiff
path: root/res/res_pjsip/pjsip_global_headers.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_pjsip/pjsip_global_headers.c')
-rw-r--r--res/res_pjsip/pjsip_global_headers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_pjsip/pjsip_global_headers.c b/res/res_pjsip/pjsip_global_headers.c
index eff870314..0fcc3a139 100644
--- a/res/res_pjsip/pjsip_global_headers.c
+++ b/res/res_pjsip/pjsip_global_headers.c
@@ -111,6 +111,7 @@ static void remove_header(struct header_list *headers, const char *to_remove)
AST_LIST_TRAVERSE_SAFE_BEGIN(headers, iter, next) {
if (!strcasecmp(iter->name, to_remove)) {
AST_LIST_REMOVE_CURRENT(next);
+ destroy_header(iter);
break;
}
}