Skip to content

Commit 49c52da

Browse files
committed
Merge branch 'jg/mailinfo-leakfix' into seen
* jg/mailinfo-leakfix: mailinfo.c: fix memory leak in function handle_content_type()
2 parents 03ff59f + ff73f37 commit 49c52da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mailinfo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ 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);
269271
return;
270272
}
271273
*(mi->content_top) = boundary;

0 commit comments

Comments
 (0)