summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/odb.c b/src/odb.c
index 23eb4e12e..6969cf772 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -786,8 +786,10 @@ attempt_lookup:
git__free(data);
data = raw.data;
- if (found && git_oid__cmp(&full_oid, &found_full_oid))
+ if (found && git_oid__cmp(&full_oid, &found_full_oid)) {
+ git__free(raw.data);
return git_odb__error_ambiguous("multiple matches for prefix");
+ }
found_full_oid = full_oid;
found = true;