Skip to content

Commit d0f238c

Browse files
committed
msg_translator: avoid mem leak when via params are present
Many thanks to Nick Altmann for spotting the issue and fixing it!
1 parent 358afd0 commit d0f238c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

msg_translator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,6 +2168,7 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
21682168
}
21692169
memcpy(extra_params.s, via_params->s, via_params->len);
21702170
memcpy(extra_params.s + via_params->len, id_buf, id_len);
2171+
pkg_free(id_buf);
21712172
} else {
21722173
extra_params.s=id_buf;
21732174
extra_params.len=id_len;

0 commit comments

Comments
 (0)