Skip to content

Commit

Permalink
Merge pull request #2088 from elkpi/master
Browse files Browse the repository at this point in the history
[mod_sofia] fix sofia_glue_get_extra_headers memory leak
  • Loading branch information
andywolk authored May 16, 2023
2 parents 9b15516 + a3a4244 commit 8aa6a8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mod/endpoints/mod_sofia/sofia_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,9 @@ char *sofia_glue_get_extra_headers(switch_channel_t *channel, const char *prefix
if ( !exclude_regex || !(/*proceed*/ switch_regex_perform(name, exclude_regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
const char *hname = name + strlen(prefix);
stream.write_function(&stream, "%s: %s\r\n", hname, value);
switch_regex_safe_free(re);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Ignoring Extra Header [%s] , matches exclude_outgoing_extra_header [%s]\n", name, exclude_regex);
switch_regex_safe_free(re);
}
}
}
Expand Down

0 comments on commit 8aa6a8a

Please sign in to comment.