[sr-dev] git:4.0: dialog_ng: Fix segfault in dlg_new_dialog

Hugh Waite hugh.waite at crocodile-rcs.com
Thu Dec 5 10:31:50 CET 2013


Module: sip-router
Branch: 4.0
Commit: 9b1882ecade859474ee9faf8a4ccc1ac061e7baa
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9b1882ecade859474ee9faf8a4ccc1ac061e7baa

Author: Hugh Waite <hugh.waite at crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite at crocodile-rcs.com>
Date:   Thu Dec  5 09:30:56 2013 +0000

dialog_ng: Fix segfault in dlg_new_dialog
(cherry picked from commit 32f9c9187a9d886c46b24ee38173274da63febda)

---

 modules/dialog_ng/dlg_handlers.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/dialog_ng/dlg_handlers.c b/modules/dialog_ng/dlg_handlers.c
index 7536725..53a45bc 100644
--- a/modules/dialog_ng/dlg_handlers.c
+++ b/modules/dialog_ng/dlg_handlers.c
@@ -905,9 +905,9 @@ int dlg_new_dialog(struct sip_msg *req, struct cell *t, const int run_initial_cb
     if (populate_leg_info(dlg, req, t, DLG_CALLER_LEG,
             &(get_from(req)->tag_value)) != 0) {
         LM_ERR("could not add further info to the dialog\n");
-        shm_free(dlg);
         lock_destroy(dlg->dlg_out_entries_lock);
         lock_dealloc(dlg->dlg_out_entries_lock);
+        shm_free(dlg);
         return -1;
     }
 




More information about the sr-dev mailing list