Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-08-12 13:50:27 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-08-12 13:50:27 +0400
commite54cfb9b544eeac2924f45fc7752c2a7be709a03 (patch)
tree159b376f5ca1c53eccd90b73c321a000a0941e0c /tests-clar/odb
parent8ca093991d3105e62a6f509e9763c1f72040e1c7 (diff)
odb: free object data when id is ambiguous
By the time we recognise this as an ambiguous id, the object's data has been loaded into memory. Free it when returning EABMIGUOUS.
Diffstat (limited to 'tests-clar/odb')
-rw-r--r--tests-clar/odb/mixed.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests-clar/odb/mixed.c b/tests-clar/odb/mixed.c
index dd4587831..51970ceec 100644
--- a/tests-clar/odb/mixed.c
+++ b/tests-clar/odb/mixed.c
@@ -22,6 +22,7 @@ void test_odb_mixed__dup_oid(void) {
cl_git_pass(git_oid_fromstr(&oid, hex));
cl_git_pass(git_odb_read_prefix(&obj, _odb, &oid, GIT_OID_HEXSZ));
+ git_odb_object_free(obj);
cl_git_pass(git_oid_fromstrn(&oid, short_hex, sizeof(short_hex) - 1));
cl_git_pass(git_odb_read_prefix(&obj, _odb, &oid, sizeof(short_hex) - 1));
git_odb_object_free(obj);