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

[PATCH] http-push cleanup

From
NHNick Hengeveld <nickh@reactrix.com>
Date
Nov 29, 2005, 17:33 UTC
Message-ID
<20051129173336.GA3809@reactrix.com>

The malloc patch from Jan Andres fixed the problem that was causing a segfault when freeing the lock token, and Johannes Schindelin found and fixed a problem when no URL is specified on the command line.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
---
 http-push.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

applies-to: 39ddd76c46b92ac971b2325acf9efecf443fbe6b 1510a5b7deec93abcf010aa867adf27ad7750293

diff --git a/http-push.c b/http-push.c
index bbb5118..56c2bb5 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1009,9 +1009,7 @@ static int unlock_remote(struct active_l
 	if (lock->owner != NULL)
 		free(lock->owner);
 	free(lock->url);
-/* Freeing the token causes a segfault...
 	free(lock->token);
-*/
 	free(lock);
 
 	return rc;
@@ -1274,6 +1272,9 @@ int main(int argc, char **argv)
 		break;
 	}
 
+	if (!remote->url)
+		usage(http_push_usage);
+
 	memset(remote_dir_exists, 0, 256);
 
 	http_init();
---
0.99.9.GIT
Message 1 of 1 in “http-push cleanup”
  1. http-push cleanupNick Hengeveld, Nov 29, 2005

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.