Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
push: add a config option push.gpgSign for default signed pushes
[gitweb.git]
/
connect.c
diff --git
a/connect.c
b/connect.c
index 1f7b7694f66d11d2ac7cc45e03a9c69e96860b02..c0144d859ae4275860df464f73a688c649d092fe 100644
(file)
--- a/
connect.c
+++ b/
connect.c
@@
-310,6
+310,8
@@
static void get_host_and_port(char **host, const char **port)
if (end != colon + 1 && *end == '\0' && 0 <= portnr && portnr < 65536) {
*colon = 0;
*port = colon + 1;
+ } else if (!colon[1]) {
+ *colon = 0;
}
}
}
@@
-739,6
+741,7
@@
struct child_process *git_connect(int fd[2], const char *url,
free(hostandport);
free(path);
+ free(conn);
return NULL;
}