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

[PATCH 1/1] Don't free remote->name after fetch

From
Kkmcguigan@twopensource.com <kmcguigan@twopensource.com>
Date
Jun 13, 2016, 18:17 UTC
Message-ID
<1465841837-31604-1-git-send-email-kmcguigan@twopensource.com>
From: Keith McGuigan <kmcguigan@twopensource.com>

The string_list gets populated with the names from the remotes[] array, which are not dup'd and the list does not own.

Signed-of-by: Keith McGuigan <kmcguigan@twopensource.com>
---
 builtin/fetch.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 630ae6a1bb78..181da5a2e7a3 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1347,8 +1347,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
 		argv_array_clear(&options);
 	}
 
-	/* All names were strdup()ed or strndup()ed */
-	list.strdup_strings = 1;
 	string_list_clear(&list, 0);
 
 	close_all_packs();
-- 
2.8.0.rc3.95.gc8e4e3a
Next: Junio C Hamano
Message 1 of 5 in “Don't free remote->name after fetch”
  1. 1/1 Don't free remote->name after fetchkmcguigan@twopensource.com, Jun 13, 2016
  2. Junio C HamanoJun 13, 2016
  3. Keith McGuiganJun 14, 2016
  4. Jeff KingJun 14, 2016
  5. Junio C HamanoJun 14, 2016

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.