Commit 350cea37ec79d228feeddfdd2e7795ab39684a6a

apnadkarni 2022-04-14T07:40:43

Makes sense. Co-authored-by: Edward Thomson <ethomson@github.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/describe.c b/src/describe.c
index cae68bd..9427e86 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -698,8 +698,7 @@ int git_describe_commit(
 		goto cleanup;
 
 cleanup:
-	if (commit != NULL)
-		git_commit_free(commit);
+	git_commit_free(commit);
 
 	git_oidmap_foreach_value(data.names, name, {
 		git_tag_free(name->tag);