The list destructor is always set when necessary (i.e. if the iterator
is successfully created), so there is never a need to invoke it
explicitly, even on failure.
*out = list;
DONE:
- if (status) {
- if (list) {
- talloc_free (list);
- if (status != NOTMUCH_STATUS_XAPIAN_EXCEPTION)
- _notmuch_config_list_destroy (list);
- }
- } else {
- talloc_set_destructor (list, _notmuch_config_list_destroy);
+ if (status && list) {
+ talloc_free (list);
}
return status;