diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-06-25 14:07:37 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-06-25 14:07:37 -0700 |
| commit | d5ee0e2961aefa249ca6866d579192089ded67f1 (patch) | |
| tree | 4e67de2f1aeec50a083713b7b54c2b4171e5110e | |
| parent | Merge branch 'jc/diff-no-index-with-pathspec-fix' (diff) | |
| parent | mailinfo.c: fix memory leak in function handle_content_type() (diff) | |
| download | git-d5ee0e2961aefa249ca6866d579192089ded67f1.tar.gz git-d5ee0e2961aefa249ca6866d579192089ded67f1.zip | |
Merge branch 'jg/mailinfo-leakfix'
Leakfix.
* jg/mailinfo-leakfix:
mailinfo.c: fix memory leak in function handle_content_type()
| -rw-r--r-- | mailinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mailinfo.c b/mailinfo.c index ee4597da6b..b4e815b2d8 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -266,6 +266,8 @@ static void handle_content_type(struct mailinfo *mi, struct strbuf *line) error("Too many boundaries to handle"); mi->input_error = -1; mi->content_top = &mi->content[MAX_BOUNDARIES] - 1; + strbuf_release(boundary); + free(boundary); return; } *(mi->content_top) = boundary; |
