summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschu <schu-github@schulog.org>2011-09-30 10:31:41 +0200
committerschu <schu-github@schulog.org>2011-09-30 10:39:33 +0200
commit472fa08f4ed17f5ecbd5f61a32b39258b9b50813 (patch)
tree002252fe35fcd5e2e3411de4b8e7f27f1751b36d
parent6c8b458dccec1a4c81825d9c0777232540abac06 (diff)
downloadlibgit2-472fa08f4ed17f5ecbd5f61a32b39258b9b50813.tar.gz
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>
-rw-r--r--src/refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refs.c b/src/refs.c
index 0acfc19c0..1135de475 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1391,7 +1391,7 @@ int git_reference_rename(git_reference *ref, const char *new_name, int force)
new_ref->name = NULL;
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;
/*