浏览代码

dialog_ng: Fix segfault in dlg_new_dialog

Hugh Waite 11 年之前
父节点
当前提交
32f9c9187a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/dialog_ng/dlg_handlers.c

+ 1 - 1
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;
     }