Fix double-free() in http-push.c:remote_exists()
authorGrégoire Barbier <gb@gbarbier.org>
Sun, 30 Dec 2007 17:15:51 +0000 (18:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 30 Dec 2007 20:24:13 +0000 (12:24 -0800)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c

index 64be904921821c077982f06cea8f66c1954eb420..55d0c944ae806b5322cba629aa6c5207afbafcfd 100644 (file)
@@ -1979,7 +1979,6 @@ static int remote_exists(const char *path)
 
        if (start_active_slot(slot)) {
                run_active_slot(slot);
-               free(url);
                if (results.http_code == 404)
                        ret = 0;
                else if (results.curl_result == CURLE_OK)
@@ -1987,7 +1986,6 @@ static int remote_exists(const char *path)
                else
                        fprintf(stderr, "HEAD HTTP error %ld\n", results.http_code);
        } else {
-               free(url);
                fprintf(stderr, "Unable to start HEAD request\n");
        }