All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Hengeveld <nickh@reactrix.com>
To: git@vger.kernel.org
Subject: [PATCH] http-push cleanup
Date: Tue, 29 Nov 2005 09:33:36 -0800	[thread overview]
Message-ID: <20051129173336.GA3809@reactrix.com> (raw)

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

                 reply	other threads:[~2005-11-29 17:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051129173336.GA3809@reactrix.com \
    --to=nickh@reactrix.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.