]> git.cworth.org Git - notmuch/commitdiff
lib/create: fix memory leak, ensure *database=NULL on error
authorDavid Bremner <david@tethera.net>
Sat, 23 Oct 2021 13:22:36 +0000 (10:22 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 30 Oct 2021 16:47:47 +0000 (13:47 -0300)
This code previously relied on _finish_open to free the notmuch struct
on errors (except for the case of database == NULL, which was a
potential double free). When we removed those frees from _finish_open,
we introduced a (small) memory leak.

In this commit, fix the memory leak, and harmonize the on-error
behaviour with n_d_open_with_config.


No differences found