fix memory leak of commitinfo
This commit is contained in:
parent
543107cc36
commit
ae6461dc6f
1 changed files with 1 additions and 1 deletions
2
stagit.c
2
stagit.c
|
@ -178,6 +178,7 @@ commitinfo_free(struct commitinfo *ci)
|
|||
git_tree_free(ci->parent_tree);
|
||||
git_commit_free(ci->commit);
|
||||
git_commit_free(ci->parent);
|
||||
free(ci);
|
||||
}
|
||||
|
||||
struct commitinfo *
|
||||
|
@ -221,7 +222,6 @@ commitinfo_getbyoid(const git_oid *id)
|
|||
|
||||
err:
|
||||
commitinfo_free(ci);
|
||||
free(ci);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue