{"thread":{"id":"16026","subject":"[PATCH] index-pack: don't leak leaf delta result","startedAt":"2008-10-23T19:05:59Z","lastAt":"2008-10-23T19:05:59Z","messageCount":1,"participants":["Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"93800","messageId":"alpine.LFD.2.00.0810231502250.26244@xanadu.home","threadId":"16026","inReplyTo":null,"subject":"[PATCH] index-pack: don't leak leaf delta result","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-10-23T19:05:59Z","receivedAt":"2008-10-23T19:05:59Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"Another (but minor this time) fallout from commit 9441b61dc5.\n\nSigned-off-by: Nicolas Pitre <nico@cam.org>\n\ndiff --git a/index-pack.c b/index-pack.c\nindex 7f97faa..fe75332 100644\n--- a/index-pack.c\n+++ b/index-pack.c\n@@ -550,8 +550,10 @@ static void find_unresolved_deltas(struct base_data *base,\n \t\tfind_delta_children(&base_spec, &ofs_first, &ofs_last);\n \t}\n \n-\tif (ref_last == -1 && ofs_last == -1)\n+\tif (ref_last == -1 && ofs_last == -1) {\n+\t\tfree(base->data);\n \t\treturn;\n+\t}\n \n \tlink_base_data(prev_base, base);\n \n\n\nNicolas\n"}]}