stagit

fix memory leak of commitinfo

Hiltjo Posthuma contact@arjunchoudhary.com

commit: a2cf87d parent: fe6a6e3
1 files changed, 1 insertions(+), 1 deletions(-)
Mstagit.c+1-1
M · stagit.c +1, -1
 1@@ -178,6 +178,7 @@ commitinfo_free(struct commitinfo *ci)
 2 	git_tree_free(ci->parent_tree);
 3 	git_commit_free(ci->commit);
 4 	git_commit_free(ci->parent);
 5+	free(ci);
 6 }
 7 
 8 struct commitinfo *
 9@@ -221,7 +222,6 @@ commitinfo_getbyoid(const git_oid *id)
10 
11 err:
12 	commitinfo_free(ci);
13-	free(ci);
14 
15 	return NULL;
16 }