X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fconfig.cc;h=0b760dbcc2063deeefde553fa66b5421fcf23d02;hb=763445beaec906440fbdd497755718ef860b88e4;hp=efab01e400708fde51470b85eee3102482f59a4e;hpb=582e919e2769bd99064b997b05e1601ffcfe9a98;p=notmuch diff --git a/lib/config.cc b/lib/config.cc index efab01e4..0b760dbc 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -133,8 +133,15 @@ notmuch_database_get_config_list (notmuch_database_t *notmuch, *out = list; DONE: - if (status && list) - talloc_free (list); + 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); + } return status; }