GNOME Bugzilla – Bug 651466
e_dbhash_new: Close and reopen db handle to avoid memory leak
Last modified: 2011-06-07 09:01:13 UTC
Created attachment 188878 [details] [review] Proposed patch According to the documentation [1], "If DB->open fails, the DB->close method should be called to discard the DB handle". The current code was calling open() again on the same handle without closing it it first, possibly causing memory leaks. This patch is adapted from commit 37d3c0f65c989afe9ffc2d734d86b2ae0019edae in eds-fremantle GIT repository. [1] http://www.cs.sunysb.edu/documentation/BerkeleyDB/api_c/db_open.html
Seems okay to me. Commit to master and backport as needed.
Chris backported the fixes and I committed them to 2.32 and 3.0 branches: c1152557704e691a527ab1f7243e9e2c798058fe e_dbhash_new: Close and reopen db handle to avoid memory leak c422b7050e5d009d3679cddcce479f9dacfbc803 e_dbhash_new: Close and reopen db handle to avoid memory leak