summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-02-21 08:02:45 +0100
committerGitHub <noreply@github.com>2019-02-21 08:02:45 +0100
commit6eb4947d05ddb586cb89c38d3199daf6752c3c78 (patch)
tree52d86ef99ce20c7aedaa352183faa922c98ecda8 /src
parent12c6e1facc1b7644ed2c51df35625b36bad92340 (diff)
parent6b3730d4b997e979c7578bf5c2da3c33aa89b023 (diff)
downloadlibgit2-6eb4947d05ddb586cb89c38d3199daf6752c3c78.tar.gz
Merge pull request #4987 from lhchavez/fix-odb_otype_fast-leak
Fix a memory leak in odb_otype_fast()
Diffstat (limited to 'src')
-rw-r--r--src/odb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/odb.c b/src/odb.c
index 6ab4bd99a..6a7e7ca7e 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1128,6 +1128,7 @@ static int odb_otype_fast(git_object_t *type_p, git_odb *db, const git_oid *id)
if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) {
*type_p = object->cached.type;
+ git_odb_object_free(object);
return 0;
}