mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 09:18:48 +00:00
refs.c: fix reference_rename
6c8b458
removed an "unused" variable needed for git_hashtable_insert2(),
causing a segfault in reference_rename(). Instead, use
git_hashtable_insert().
Signed-off-by: schu <schu-github@schulog.org>
This commit is contained in:
parent
6c8b458dcc
commit
472fa08f4e
@ -1391,7 +1391,7 @@ int git_reference_rename(git_reference *ref, const char *new_name, int force)
|
|||||||
new_ref->name = NULL;
|
new_ref->name = NULL;
|
||||||
reference_free(new_ref);
|
reference_free(new_ref);
|
||||||
|
|
||||||
if ((error = git_hashtable_insert2(ref->owner->references.loose_cache, ref->name, ref, NULL)) < GIT_SUCCESS)
|
if ((error = git_hashtable_insert(ref->owner->references.loose_cache, ref->name, ref)) < GIT_SUCCESS)
|
||||||
goto rollback;
|
goto rollback;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user