notmuch/lib
David Bremner 74c4ce6d88 lib/open: fix potential double-free, ensure *database=NULL on error
During refactoring for 0.32, the code that set notmuch=NULL on various
errors was moved into _finish_open. This meant that the the code which
relied on that to set *database to NULL on error was no longer
correct. It also introduced a potential double free, since the notmuch
struct was deallocated inside _finish_open (via n_d_destroy).

In this commit we revert to "allocator frees", and leave any cleanup
to the caller of _finish_open. This allows us to get back the
behaviour of setting *database to NULL with a small change. Other
callers of _finish_open will need free notmuch on errors.
2021-10-30 13:43:58 -03:00
..
add-message.cc Merge branch 'release' 2021-05-22 09:34:55 -03:00
built-with.c configure: optional library sfsexp 2021-09-04 17:07:19 -07:00
config.cc lib: use 'localhost' rather than fqdn for default mail address. 2021-09-10 08:17:06 -03:00
database-private.h lib: factor out expansion of saved queries. 2021-09-04 17:07:19 -07:00
database.cc lib: add new status code for query syntax errors. 2021-09-04 17:07:19 -07:00
directory.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
features.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
filenames.c lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
index.cc lib: make glib initialization thread-safe 2021-05-13 22:21:57 -03:00
indexopts.c lib: run uncrustify 2021-03-13 08:45:34 -04:00
init.cc lib: make glib initialization thread-safe 2021-05-13 22:21:57 -03:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local lib/parse-sexp: parse single terms and the empty list. 2021-09-04 17:07:19 -07:00
message-file.c lib: consider all instances of Delivered-To header 2021-08-29 18:10:08 -07:00
message-id.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
message-private.h lib: convert notmuch_bool_t to stdbool internally 2017-10-09 22:27:16 -03:00
message-property.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
message.cc lib/message: use passed database for error handling 2021-06-05 15:41:28 -03:00
messages.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
notmuch-private.h lib: make glib initialization thread-safe 2021-05-13 22:21:57 -03:00
notmuch.h lib: document n_o_w_config can return NOTMUCH_STATUS_NO_CONFIG 2021-10-30 13:41:57 -03:00
notmuch.sym build: switch to hiding libnotmuch symbols by default 2017-05-12 07:17:18 -03:00
open.cc lib/open: fix potential double-free, ensure *database=NULL on error 2021-10-30 13:43:58 -03:00
parse-sexp.cc lib/parse-sexp: apply macros 2021-09-04 17:07:19 -07:00
parse-time-vrp.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
parse-time-vrp.h lib: migrate from Xapian ValueRangeProcessor to RangeProcessor 2020-07-11 17:20:09 -03:00
prefix.cc lib: run uncrustify 2021-03-13 08:45:34 -04:00
query-fp.cc lib: factor out expansion of saved queries. 2021-09-04 17:07:19 -07:00
query-fp.h build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
query.cc lib/thread-fp: factor out query expansion, rewrite in Xapian 2021-09-04 17:07:19 -07:00
regexp-fields.cc lib: factor out query construction from regexp 2021-09-04 17:07:19 -07:00
regexp-fields.h lib: factor out query construction from regexp 2021-09-04 17:07:19 -07:00
sha1.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
string-list.c lib: run uncrustify 2019-06-14 07:41:27 -03:00
string-map.c lib: run uncrustify 2021-03-13 08:45:34 -04:00
tags.c Use https instead of http where possible 2016-06-05 08:32:17 -03:00
thread-fp.cc lib/thread-fp: factor out query expansion, rewrite in Xapian 2021-09-04 17:07:19 -07:00
thread-fp.h build: drop support for xapian versions less than 1.4 2020-04-23 21:28:45 -03:00
thread.cc lib/thread: add common prefix to debug messages, join lines 2021-05-23 08:01:38 -03:00