diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-06-21 21:15:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-21 21:15:31 -0700 |
commit | be273c73b72b67154eae7ce4f3ad66098a7f8f47 (patch) | |
tree | 6517cde13f7f39441bc49d78dfd2037f7d1048e8 /http-push.c | |
parent | d836118be990867be3a4d3ce932f58d761e5e612 (diff) | |
parent | 16493eb0d0da26f80286b39c7b6900e261744afa (diff) | |
download | git-be273c73b72b67154eae7ce4f3ad66098a7f8f47.tar.gz |
Merge branch 'rc/maint-http-local-slot-fix' into maint
* rc/maint-http-local-slot-fix:
http*: cleanup slot->local after fclose
Diffstat (limited to 'http-push.c')
-rw-r--r-- | http-push.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/http-push.c b/http-push.c index e16a0ad3f9..0b12ffe18f 100644 --- a/http-push.c +++ b/http-push.c @@ -724,9 +724,11 @@ static void finish_request(struct transfer_request *request) struct stat st; struct packed_git *target; struct packed_git **lst; + struct active_request_slot *slot; request->curl_result = request->slot->curl_result; request->http_code = request->slot->http_code; + slot = request->slot; request->slot = NULL; /* Keep locks active */ @@ -823,6 +825,7 @@ static void finish_request(struct transfer_request *request) fclose(request->local_stream); request->local_stream = NULL; + slot->local = NULL; if (!move_temp_to_file(request->tmpfile, request->filename)) { target = (struct packed_git *)request->userData; @@ -1024,17 +1027,20 @@ static int fetch_index(unsigned char *sha1) if (results.curl_result != CURLE_OK) { free(url); fclose(indexfile); + slot->local = NULL; return error("Unable to get pack index %s\n%s", url, curl_errorstr); } } else { free(url); fclose(indexfile); + slot->local = NULL; return error("Unable to start request"); } free(url); fclose(indexfile); + slot->local = NULL; return move_temp_to_file(tmpfile, filename); } |