{"thread":{"id":"2709","subject":"[PATCH] http-push cleanup","startedAt":"2005-11-29T17:33:36Z","lastAt":"2005-11-29T17:33:36Z","messageCount":1,"participants":["Nick Hengeveld"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12939","messageId":"20051129173336.GA3809@reactrix.com","threadId":"2709","inReplyTo":null,"subject":"[PATCH] http-push cleanup","fromName":"Nick Hengeveld","fromEmail":"nickh@reactrix.com","sentAt":"2005-11-29T17:33:36Z","receivedAt":"2005-11-29T17:33:36Z","isPatch":true,"sender":{"key":"nickh@reactrix.com","avatar":null},"body":"The malloc patch from Jan Andres fixed the problem that was causing a\nsegfault when freeing the lock token, and Johannes Schindelin found\nand fixed a problem when no URL is specified on the command line.\n\nSigned-off-by: Nick Hengeveld <nickh@reactrix.com>\n\n\n---\n\n http-push.c |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\napplies-to: 39ddd76c46b92ac971b2325acf9efecf443fbe6b\n1510a5b7deec93abcf010aa867adf27ad7750293\ndiff --git a/http-push.c b/http-push.c\nindex bbb5118..56c2bb5 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -1009,9 +1009,7 @@ static int unlock_remote(struct active_l\n \tif (lock->owner != NULL)\n \t\tfree(lock->owner);\n \tfree(lock->url);\n-/* Freeing the token causes a segfault...\n \tfree(lock->token);\n-*/\n \tfree(lock);\n \n \treturn rc;\n@@ -1274,6 +1272,9 @@ int main(int argc, char **argv)\n \t\tbreak;\n \t}\n \n+\tif (!remote->url)\n+\t\tusage(http_push_usage);\n+\n \tmemset(remote_dir_exists, 0, 256);\n \n \thttp_init();\n---\n0.99.9.GIT\n"}]}