Przeglądaj źródła

modules/ims_charging: release S-CSCF contact (unref) after use
- failing to do this results in contact never being freed

Jason Penton 10 lat temu
rodzic
commit
8caaeff0a8
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      modules/ims_charging/dialog.c

+ 2 - 0
modules/ims_charging/dialog.c

@@ -236,6 +236,7 @@ void remove_dlg_data_from_contact(struct dlg_cell *dlg, int type, struct dlg_cb_
 		LM_DBG("This contact: <%.*s> is not in usrloc, ignore - NOTE: You need S-CSCF usrloc set to match_mode CONTACT_PORT_IP_ONLY\n", impu_data->contact.len, impu_data->contact.s);
 	    } else {//contact exists so add dialog data to it
 		ul.remove_dialog_data_from_contact(ucontact, dlg->h_entry, dlg->h_id);
+		ul.release_ucontact(ucontact);
 	    }
 	}
 	ul.unlock_udomain(domain_t, &impu_data->identity);
@@ -277,6 +278,7 @@ void add_dlg_data_to_contact(struct dlg_cell *dlg, int type, struct dlg_cb_param
 		LM_DBG("This contact: <%.*s> is not in usrloc, ignore - NOTE: You need S-CSCF usrloc set to match_mode CONTACT_PORT_IP_ONLY\n", impu_data->contact.len, impu_data->contact.s);
 	    } else {//contact exists so add dialog data to it
 		ul.add_dialog_data_to_contact(ucontact, dlg->h_entry, dlg->h_id);
+		ul.release_ucontact(ucontact);
 	    }
 	}
 	ul.unlock_udomain(domain_t, &impu_data->identity);