Module: kamailio
Branch: 5.6
Commit: d4d28c098ddc07ab1b956a13878cd8e6f180fe3d
URL:
https://github.com/kamailio/kamailio/commit/d4d28c098ddc07ab1b956a13878cd8e…
Author: Stefan Mititelu <stefan-cristian.mititelu(a)1and1.ro>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-07-20T09:38:17+02:00
dialog: set cbs list to NULL after destroying
(cherry picked from commit 6881faadec45dd16dd896b13db44862e7df70422)
(cherry picked from commit 20be29ab3638d803341ec376b02edd7c14a9174a)
---
Modified: src/modules/dialog/dlg_hash.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d4d28c098ddc07ab1b956a13878cd8e…
Patch:
https://github.com/kamailio/kamailio/commit/d4d28c098ddc07ab1b956a13878cd8e…
---
diff --git a/src/modules/dialog/dlg_hash.c b/src/modules/dialog/dlg_hash.c
index 54b8916d4e0..d61bfb62b49 100644
--- a/src/modules/dialog/dlg_hash.c
+++ b/src/modules/dialog/dlg_hash.c
@@ -370,8 +370,11 @@ void destroy_dlg(struct dlg_cell *dlg)
if (dlg_db_mode)
remove_dialog_from_db(dlg);
- if (dlg->cbs.first)
+ if(dlg->cbs.first) {
destroy_dlg_callbacks_list(dlg->cbs.first);
+ dlg->cbs.first = NULL;
+ dlg->cbs.types = 0;
+ }
if (dlg->profile_links)
destroy_linkers(dlg->profile_links);