Fix warning
diff --git a/tests/submodule/init.c b/tests/submodule/init.c
index 6d4c75c..29004d6 100644
--- a/tests/submodule/init.c
+++ b/tests/submodule/init.c
@@ -109,7 +109,7 @@ void test_submodule_init__relative_url_detached_head(void)
git_buf_free(&absolute_url);
git_config_free(cfg);
- git_commit_free(head_commit);
+ git_object_free(head_commit);
git_reference_free(head_ref);
git_submodule_free(sm);
}