summaryrefslogtreecommitdiff
path: root/src/status.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-04-04 13:13:43 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-04-04 13:13:43 +0200
commit8e8b6b01f592b9e366203d70802e44d1a6a08e5f (patch)
treebc05cf6bfb7248f7d45e56072ac730aa303a6db9 /src/status.c
parent2ec83ff09de3448b5439b2bc63e90398992ae8ca (diff)
downloadlibgit2-8e8b6b01f592b9e366203d70802e44d1a6a08e5f.tar.gz
Clean up valgrind warnings
Diffstat (limited to 'src/status.c')
-rw-r--r--src/status.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/status.c b/src/status.c
index 88dd5e03b..7cd914f21 100644
--- a/src/status.c
+++ b/src/status.c
@@ -43,6 +43,8 @@ static int resolve_head_to_tree(git_tree **tree, git_repository *repo)
if (git_object_lookup(&obj, repo, git_reference_oid(head), GIT_OBJ_ANY) < 0)
goto fail;
+ git_reference_free(head);
+
switch (git_object_type(obj)) {
case GIT_OBJ_TREE:
*tree = (git_tree *)obj;