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

[PATCH] index-pack: don't leak leaf delta result

From
Nicolas Pitre <nico@cam.org>
Date
Oct 23, 2008, 19:05 UTC
Message-ID
<alpine.LFD.2.00.0810231502250.26244@xanadu.home>
Another (but minor this time) fallout from commit 9441b61dc5.
Signed-off-by: Nicolas Pitre <nico@cam.org>
diff --git a/index-pack.c b/index-pack.c
index 7f97faa..fe75332 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -550,8 +550,10 @@ static void find_unresolved_deltas(struct base_data *base,
 		find_delta_children(&base_spec, &ofs_first, &ofs_last);
 	}
 
-	if (ref_last == -1 && ofs_last == -1)
+	if (ref_last == -1 && ofs_last == -1) {
+		free(base->data);
 		return;
+	}
 
 	link_base_data(prev_base, base);
 


Nicolas
Message 1 of 1 in “index-pack: don't leak leaf delta result”
  1. index-pack: don't leak leaf delta resultNicolas Pitre, Oct 23, 2008

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.