It's also not really necessary to check that `rv.items[i].data != NULL`, `free()` handles it fine.

```c
  if (err->set) {
    for (size_t i = 0; i < rv.size; i++) {
      free(rv.items[i].data);
    }
  }

  free(rv.items);
  rv.items = NULL;
  rv.size = 0;
```

Perhaps an `empty_string_array()` function could reduce the last two lines to 1. Or even a `free_string_array()` that does all of the above.