mirror of
https://github.com/git/git.git
synced 2024-05-09 19:36:10 +02:00
Merge branch 'rs/fetch-pack-invalid-lockfile'
"fetch-pack" could pass NULL pointer to unlink(2) when it sees an invalid filename; the error checking has been tightened to make this impossible. * rs/fetch-pack-invalid-lockfile: fetch-pack: disregard invalid pack lockfiles
This commit is contained in:
commit
eae47db865
|
@ -918,8 +918,9 @@ static int get_pack(struct fetch_pack_args *args,
|
|||
if (start_command(&cmd))
|
||||
die(_("fetch-pack: unable to fork off %s"), cmd_name);
|
||||
if (do_keep && pack_lockfiles) {
|
||||
string_list_append_nodup(pack_lockfiles,
|
||||
index_pack_lockfile(cmd.out));
|
||||
char *pack_lockfile = index_pack_lockfile(cmd.out);
|
||||
if (pack_lockfile)
|
||||
string_list_append_nodup(pack_lockfiles, pack_lockfile);
|
||||
close(cmd.out);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue