diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-07-02 09:27:58 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-07-02 09:27:58 -0700 |
| commit | 5cf6e9b022cd281b2da66c58b5c033b9b735c160 (patch) | |
| tree | f34edb5e7836b7c084cee285f66d8a83f0f2ea11 /fetch-pack.c | |
| parent | 77a6c4c73074501a11dd121480d2b0c8b8eab9b1 (diff) | |
| parent | 96a6621d256dc39a561913f5aadd1605ba33f161 (diff) | |
Merge branch 'jk/fetch-pack-fsck-wo-lock-pack' into maint-2.45
"git fetch-pack -k -k" without passing "--lock-pack" (which we
never do ourselves) did not work at all, which has been corrected.
* jk/fetch-pack-fsck-wo-lock-pack:
fetch-pack: fix segfault when fscking without --lock-pack
Diffstat (limited to 'fetch-pack.c')
| -rw-r--r-- | fetch-pack.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 28a62e502e..8fb56482c3 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -1036,8 +1036,10 @@ static int get_pack(struct fetch_pack_args *args, if (!is_well_formed) die(_("fetch-pack: invalid index-pack output")); - if (pack_lockfile) + if (pack_lockfiles && pack_lockfile) string_list_append_nodup(pack_lockfiles, pack_lockfile); + else + free(pack_lockfile); parse_gitmodules_oids(cmd.out, gitmodules_oids); close(cmd.out); } |
