Browse Source

sca: free in case of parse headers error

(cherry picked from commit 6d658fe6c1af84368d093942356cf2b116ff17e5)
Daniel-Constantin Mierla 4 tháng trước cách đây
mục cha
commit
17f763a892
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/modules/sca/sca_call_info.c

+ 1 - 0
src/modules/sca/sca_call_info.c

@@ -609,6 +609,7 @@ int sca_call_info_seize_held_call(sip_msg_t *msg, sca_call_info *call_info,
 	// all headers must be parsed before using lump functions
 	if(parse_headers(msg, HDR_EOH_F, 0) < 0) {
 		LM_ERR("Failed to parse_headers\n");
+		pkg_free(replaces_hdr.s);
 		goto done;
 	}