projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8ee1c7
)
lib: Release resources if notmuch_database_open fails
author
Austin Clements
<amdragon@MIT.EDU>
Sun, 29 Jan 2012 05:50:09 +0000
(
00:50
-0500)
committer
David Bremner
<bremner@debian.org>
Sat, 4 Feb 2012 01:15:26 +0000
(21:15 -0400)
Previously, if a Xapian exception occurred in notmuch_database_open,
we failed to clean up the allocated notmuch_database_t object.
lib/database.cc
patch
|
blob
|
history
diff --git
a/lib/database.cc
b/lib/database.cc
index a6d15a13208a5535cb11e3da8275f73cc20284a8..94022d7ce3ae9c060ecf18baaca1aa95afa11781 100644
(file)
--- a/
lib/database.cc
+++ b/
lib/database.cc
@@
-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;
}