diff options
| author | David Bremner <david@tethera.net> | 2023-12-03 14:56:44 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2023-12-06 07:33:05 -0400 |
| commit | b97cd90040a8353e6f94c317af2020f3d6e67a2e (patch) | |
| tree | e5e3e1d33ea5cf5ff458ba328e85cbe198068df0 /lib/open.cc | |
| parent | 5a582e8ed9b9bfd88e63149fb671510bc2b2e9f8 (diff) | |
lib: clear error message on success in _choose_database_path
Previously we both found a database and returned a message saying that
the database could not be found (along with a success code). This
change should prevent spurious error output.
Diffstat (limited to 'lib/open.cc')
| -rw-r--r-- | lib/open.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/open.cc b/lib/open.cc index 005872dc..463e38bf 100644 --- a/lib/open.cc +++ b/lib/open.cc @@ -249,6 +249,11 @@ _choose_database_path (notmuch_database_t *notmuch, return NOTMUCH_STATUS_NO_DATABASE; } + if (*message) { + free (*message); + *message = NULL; + } + return NOTMUCH_STATUS_SUCCESS; } |
