aboutsummaryrefslogtreecommitdiff
path: root/http-walker.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-13 12:51:09 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-13 12:51:09 -0700
commitfa71e80525d36ecd911bd0aca87ceb515babd1e9 (patch)
treeee31b77eb1f90061c0391f7d9582def86e689756 /http-walker.c
parent95ad2a65fbb9b7f26669fed9906fe9a1a531810b (diff)
parent16493eb0d0da26f80286b39c7b6900e261744afa (diff)
downloadgit-fa71e80525d36ecd911bd0aca87ceb515babd1e9.tar.gz
git-fa71e80525d36ecd911bd0aca87ceb515babd1e9.tar.xz
Merge branch 'rc/maint-http-local-slot-fix'
* rc/maint-http-local-slot-fix: http*: cleanup slot->local after fclose
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/http-walker.c b/http-walker.c
index 7321ccc9f..937785192 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -418,15 +418,18 @@ static int fetch_index(struct walker *walker, struct alt_base *repo, unsigned ch
run_active_slot(slot);
if (results.curl_result != CURLE_OK) {
fclose(indexfile);
+ slot->local = NULL;
return error("Unable to get pack index %s\n%s", url,
curl_errorstr);
}
} else {
fclose(indexfile);
+ slot->local = NULL;
return error("Unable to start request");
}
fclose(indexfile);
+ slot->local = NULL;
return move_temp_to_file(tmpfile, filename);
}
@@ -776,16 +779,19 @@ static int fetch_pack(struct walker *walker, struct alt_base *repo, unsigned cha
run_active_slot(slot);
if (results.curl_result != CURLE_OK) {
fclose(packfile);
+ slot->local = NULL;
return error("Unable to get pack file %s\n%s", url,
curl_errorstr);
}
} else {
fclose(packfile);
+ slot->local = NULL;
return error("Unable to start request");
}
target->pack_size = ftell(packfile);
fclose(packfile);
+ slot->local = NULL;
ret = move_temp_to_file(tmpfile, filename);
if (ret)