projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a95dbba
)
lib: do not leak the database in compaction
author
Jani Nikula
<jani@nikula.org>
Sun, 3 Nov 2013 12:24:44 +0000
(14:24 +0200)
committer
David Bremner
<david@tethera.net>
Thu, 7 Nov 2013 10:46:25 +0000
(06:46 -0400)
Destroy instead of close the database after compaction, and also on
error path, to not leak the database.
lib/database.cc
patch
|
blob
|
history
diff --git
a/lib/database.cc
b/lib/database.cc
index 7a8702e263c46985bb21818d3f8dd039e39799d6..eadf8a763395187afccd18cefad47e1cca8d2650 100644
(file)
--- a/
lib/database.cc
+++ b/
lib/database.cc
@@
-941,10
+941,12
@@
notmuch_database_compact (const char* path,
goto DONE;
}
- notmuch_database_close(notmuch);
-
DONE:
+ if (notmuch)
+ notmuch_database_destroy (notmuch);
+
talloc_free(local);
+
return ret;
}
#else