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

[PATCH] http: release strbuf on disabled alternates

From
EWEric Wong <e@80x24.org>
Date
Mar 4, 2017, 01:50 UTC
Message-ID
<20170304015016.GA25408@starla>

This likely has no real-world impact on memory usage, but it is cleaner for future readers.

Fixes: abcbdc03895f ("http: respect protocol.*.allow=user for http-alternates")
Signed-off-by: Eric Wong <e@80x24.org>
---
 http-walker.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/http-walker.c b/http-walker.c
index b34b6ace7c..2c85316112 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -314,6 +314,8 @@ static void process_alternates_response(void *callback_data)
 					while (tail->next != NULL)
 						tail = tail->next;
 					tail->next = newalt;
+				} else {
+					strbuf_release(&target);
 				}
 			}
 		}
-- 
EW
Next: Jeff King
Message 1 of 2 in “http: release strbuf on disabled alternates”
  1. http: release strbuf on disabled alternatesEric Wong, Mar 4, 2017
  2. Jeff KingMar 4, 2017

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.