mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-26 03:14:51 +01:00
lib: Release resources if notmuch_database_open fails
Previously, if a Xapian exception occurred in notmuch_database_open, we failed to clean up the allocated notmuch_database_t object.
This commit is contained in:
parent
a8ee1c75c3
commit
6c0adab23e
1 changed files with 1 additions and 0 deletions
|
@ -703,6 +703,7 @@ notmuch_database_open (const char *path,
|
|||
} catch (const Xapian::Error &error) {
|
||||
fprintf (stderr, "A Xapian exception occurred opening database: %s\n",
|
||||
error.get_msg().c_str());
|
||||
notmuch_database_close (notmuch);
|
||||
notmuch = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue