Fix double-free() in http-push.c:remote_exists()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Grégoire Barbier committed
Dec 30, 2007 at 18:15 UTC
d6ed263fc7458e97ad032837ffdab6013d039543
1 file changed
-2
http-push.c
-2
@@ -1979,7 +1979,6 @@ static int remote_exists(const char *path)
1979
1980
if (start_active_slot(slot)) {
1981
run_active_slot(slot);
1982
- free(url);
1982
if (results.http_code == 404)
1983
ret = 0;
1984
else if (results.curl_result == CURLE_OK)
@@ -1987,7 +1986,6 @@ static int remote_exists(const char *path)
1986
else
1987
fprintf(stderr, "HEAD HTTP error %ld\n", results.http_code);
1988
} else {
1990
- free(url);
1989
fprintf(stderr, "Unable to start HEAD request\n");
1990
}
1991