Skip to content

Commit

Permalink
MT#55283 fix possible mem leak
Browse files Browse the repository at this point in the history
Change-Id: I651d0391f90d00f225d27ac92097511fa03d4c02
  • Loading branch information
rfuchs committed Sep 10, 2024
1 parent f35d70f commit 896b248
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions daemon/control_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static int control_stream_parse(struct streambuf_stream *s, char *line) {
0, 0, md, NULL);
if (ret <= 0) {
ilogs(control, LOG_WARNING, "Unable to parse command line from %s: %s", s->addr, line);
pcre2_match_data_free(md);
return -1;
}

Expand Down
1 change: 1 addition & 0 deletions daemon/control_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static void control_udp_incoming(struct obj *obj, struct udp_buffer *udp_buf) {
ret = pcre2_match(u->fallback_re, (PCRE2_SPTR8) udp_buf->str.s, udp_buf->str.len, 0, 0, md, NULL);
if (ret <= 0) {
ilogs(control, LOG_WARNING, "Unable to parse command line from udp:%s: %.*s", udp_buf->addr, STR_FMT(&udp_buf->str));
pcre2_match_data_free(md);
return;
}

Expand Down

0 comments on commit 896b248

Please sign in to comment.