commit 92dc95a8ef154c5ab569feff59be53cea26f5a90 from: Stefan Sperling date: Tue Mar 24 14:07:59 2020 UTC always initialize pack hash output parameter of got_fetch_pack() commit - fd2512569717d197f9d892f934f3d490bb1ce0c0 commit + 92dc95a8ef154c5ab569feff59be53cea26f5a90 blob - 9cdf6781c6716b721ebbe42fd37c027823ee6ba8 blob + ffdb2f264540f878337fd2792f8b41eafa1d5b55 --- lib/fetch.c +++ lib/fetch.c @@ -417,6 +417,8 @@ got_fetch_pack(struct got_object_id **pack_hash, struc size_t ref_prefixlen = 0; char *path; char *progress = NULL; + + *pack_hash = NULL; /* * Prevent fetching of references that won't make any @@ -434,7 +436,6 @@ got_fetch_pack(struct got_object_id **pack_hash, struc if (!list_refs_only) repo_path = got_repo_get_path_git_dir(repo); - *pack_hash = NULL; for (i = 0; i < nitems(tmpfds); i++) tmpfds[i] = -1;