Merge branch 'cb/http-push-null-in-message-fix'
authorJunio C Hamano <gitster@pobox.com>
Sun, 19 May 2019 07:45:35 +0000 (16:45 +0900)
committerJunio C Hamano <gitster@pobox.com>
Sun, 19 May 2019 07:45:35 +0000 (16:45 +0900)
Code clean-up.

* cb/http-push-null-in-message-fix:
http-push: prevent format overflow warning with gcc >= 9

http-push.c
index f675a9631662ef5f6841b376e352b7b159e52e14..e36561a6db0752f12fe22883f81489d62d81a4ca 100644 (file)
@@ -526,8 +526,8 @@ static void finish_request(struct transfer_request *request)
        if (request->headers != NULL)
                curl_slist_free_all(request->headers);
 
-       /* URL is reused for MOVE after PUT */
-       if (request->state != RUN_PUT) {
+       /* URL is reused for MOVE after PUT and used during FETCH */
+       if (request->state != RUN_PUT && request->state != RUN_FETCH_PACKED) {
                FREE_AND_NULL(request->url);
        }