diff --git a/reftable/stack.c b/reftable/stack.c index ab12926708..c052b211fa 100644 --- a/reftable/stack.c +++ b/reftable/stack.c @@ -171,7 +171,8 @@ void reftable_stack_destroy(struct reftable_stack *st) st->merged = NULL; } - err = read_lines(st->list_file, &names); + if (st->list_file) + err = read_lines(st->list_file, &names); if (err < 0) { REFTABLE_FREE_AND_NULL(names); }