Skip to content

Commit f2e371f

Browse files
committed
Merge branch 'jg/mailinfo-leakfix' into seen
* jg/mailinfo-leakfix: Fix memory leak in function handle_content_type
2 parents 03ff59f + 1454d73 commit f2e371f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mailinfo.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ static void handle_content_type(struct mailinfo *mi, struct strbuf *line)
266266
error("Too many boundaries to handle");
267267
mi->input_error = -1;
268268
mi->content_top = &mi->content[MAX_BOUNDARIES] - 1;
269+
strbuf_release(boundary);
270+
free(boundary);
271+
boundary = NULL;
269272
return;
270273
}
271274
*(mi->content_top) = boundary;

0 commit comments

Comments
 (0)