@matheusbsbs / matheus-bagliano / commits / 3e9fabc85e
Fork 0

http-push cleanup

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> Signed-off-by: Junio C Hamano <junkio@cox.net>

Nick Hengeveld committed Nov 29, 2005 at 09:33 UTC 3e9fabc85ef44fa0f275dd89738a2dacb7b6f5db
1 file changed +3 -2
http-push.c
+3 -2
@@ -1008,9 +1008,7 @@ static int unlock_remote(struct active_lock *lock)
1008 if (lock->owner != NULL)
1009 free(lock->owner);
1010 free(lock->url);
1011 -/* Freeing the token causes a segfault...
1011 free(lock->token);
1013 -*/
1012 free(lock);
1013
1014 return rc;
@@ -1273,6 +1271,9 @@ int main(int argc, char **argv)
1271 break;
1272 }
1273
1274 + if (!remote->url)
1275 + usage(http_push_usage);
1276 +
1277 memset(remote_dir_exists, 0, 256);
1278
1279 http_init();