git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] FIX memory leak in one branch

From
MGMd Isfarul Haque via GitGitGadget <gitgitgadget@gmail.com>
Date
Jan 24, 2024, 14:04 UTC
Message-ID
<a7c81f7e114fc8854436e2ca1fccb4c968653317.1706105064.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1653.git.git.1706105064.gitgitgadget@gmail.com>
From: Md Isfarul Haque <isfarul.876@gmail.com>
Signed-off-by: Md Isfarul Haque <isfarul.876@gmail.com>
---
 diff.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/diff.c b/diff.c
index e3223b8ce5b..9fa00103a6b 100644
--- a/diff.c
+++ b/diff.c
@@ -2309,6 +2309,7 @@ const struct strbuf *diff_line_prefix_buf(struct diff_options *opt)
 		msgbuf->alloc = 1;
 	}
 	else {
+		free(msgbuf);
 		msgbuf = opt->output_prefix(opt, opt->output_prefix_data);
 	}
 	return msgbuf;
-- 
gitgitgadget
Previous: Md Isfarul HaqueNext: Junio C Hamano
Message 7 of 9 in “FIX: use utf8_strnwidth for line_prefix in diff.c”
  1. 0/2 [GSoC][RFC/Patch] FIX: use utf8_strnwidth for line_prefix in diff.cMd Isfarul Haque via GitGitGadget, Jan 24, 2024
  2. 1/2 FIX: use utf8_strnwidth for line_prefix in diff.cMd Isfarul Haque via GitGitGadget, Jan 24, 2024
  3. Christian CouderJan 24, 2024
  4. Md Isfarul HaqueJan 25, 2024
  5. Junio C HamanoJan 24, 2024
  6. Md Isfarul HaqueJan 25, 2024
  7. 2/2 FIX memory leak in one branchMd Isfarul Haque via GitGitGadget, Jan 24, 2024
  8. Junio C HamanoJan 24, 2024
  9. Junio C HamanoJan 24, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.