[sr-dev] git:master:0a8062df: modules/ims_dialog: release lock on error condition

jaybeepee jason.penton at gmail.com
Fri Feb 12 19:05:29 CET 2016


Module: kamailio
Branch: master
Commit: 0a8062dfa0f0b1cc13825b75fea688548409c9c3
URL: https://github.com/kamailio/kamailio/commit/0a8062dfa0f0b1cc13825b75fea688548409c9c3

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2016-02-12T20:04:44+02:00

modules/ims_dialog: release lock on error condition

---

Modified: modules/ims_dialog/dlg_hash.c

---

Diff:  https://github.com/kamailio/kamailio/commit/0a8062dfa0f0b1cc13825b75fea688548409c9c3.diff
Patch: https://github.com/kamailio/kamailio/commit/0a8062dfa0f0b1cc13825b75fea688548409c9c3.patch

---

diff --git a/modules/ims_dialog/dlg_hash.c b/modules/ims_dialog/dlg_hash.c
index 230e1f4..5860df4 100644
--- a/modules/ims_dialog/dlg_hash.c
+++ b/modules/ims_dialog/dlg_hash.c
@@ -452,6 +452,7 @@ int dlg_set_leg_info(struct dlg_cell *dlg, str* tag, str *rr, str *contact,
                         dlg_out->callee_route_set.s = (char*) shm_malloc(rr->len);
                         if (!dlg_out->callee_route_set.s) {
                             LM_ERR("no more shm mem\n");
+							lock_release(dlg->dlg_out_entries_lock);
                             return -1; //if we're out of mem we dont really care about cleaning up - prob going to crash anyway
                         }
                         dlg_out->callee_route_set.len = rr->len;




More information about the sr-dev mailing list