diff options
author | lhchavez <lhchavez@lhchavez.com> | 2019-02-16 19:55:30 -0800 |
---|---|---|
committer | lhchavez <lhchavez@lhchavez.com> | 2019-02-20 06:31:38 -0800 |
commit | 6b3730d4b997e979c7578bf5c2da3c33aa89b023 (patch) | |
tree | 52d86ef99ce20c7aedaa352183faa922c98ecda8 /src/odb.c | |
parent | 12c6e1facc1b7644ed2c51df35625b36bad92340 (diff) | |
download | libgit2-6b3730d4b997e979c7578bf5c2da3c33aa89b023.tar.gz |
Fix a memory leak in odb_otype_fast()
This change frees a copy of a cached object in odb_otype_fast().
Diffstat (limited to 'src/odb.c')
-rw-r--r-- | src/odb.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |