Skip to content

Commit

Permalink
msg_translator: avoid mem leak when via params are present
Browse files Browse the repository at this point in the history
Many thanks to Nick Altmann for spotting the issue and fixing it!

(cherry picked from commit d0f238c)
  • Loading branch information
razvancrainea committed Feb 22, 2024
1 parent c7e2c16 commit 6d7ccca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions msg_translator.c
Original file line number Diff line number Diff line change
Expand Up @@ -2168,6 +2168,7 @@ char * build_req_buf_from_sip_req( struct sip_msg* msg,
}
memcpy(extra_params.s, via_params->s, via_params->len);
memcpy(extra_params.s + via_params->len, id_buf, id_len);
pkg_free(id_buf);
} else {
extra_params.s=id_buf;
extra_params.len=id_len;
Expand Down

0 comments on commit 6d7ccca

Please sign in to comment.