summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ref-filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ref-filter.c b/ref-filter.c
index 27733ef013..8db7ca95b1 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1439,7 +1439,8 @@ static const char *get_refname(struct used_atom *atom, struct ref_array_item *re
static int get_object(struct ref_array_item *ref, const struct object_id *oid,
int deref, struct object **obj, struct strbuf *err)
{
- int eaten;
+ /* parse_object_buffer() will set eaten to 0 if free() will be needed */
+ int eaten = 1;
int ret = 0;
unsigned long size;
void *buf = get_obj(oid, obj, &size, &eaten);