diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-09-14 14:48:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-14 14:48:15 -0700 |
commit | b2025146d0718d953036352f8435cfa392b1d799 (patch) | |
tree | 18bd3fc20b0565f94bce0a3e94b6a83b26b88627 | |
parent | 59b8d38f6e4f19b93c5dc4493ab11706acd101b5 (diff) | |
download | git-b2025146d0718d953036352f8435cfa392b1d799.tar.gz git-b2025146d0718d953036352f8435cfa392b1d799.tar.xz |
http.c: avoid freeing an uninitialized pointer
An earlier 59b8d38 (http.c: remove verification of remote packs) left
the variable "url" uninitialized; "goto cleanup" codepath can free it
which is not very nice.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | http.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -866,7 +866,7 @@ static int fetch_pack_index(unsigned char *sha1, const char *base_url) int ret = 0; char *hex = xstrdup(sha1_to_hex(sha1)); char *filename; - char *url; + char *url = NULL; struct strbuf buf = STRBUF_INIT; if (has_pack_index(sha1)) { |