Bug#379153: [Pkg-db-devel] Processed: leak in db->upgrade
dann frazier
dannf at debian.org
Sat Oct 7 00:26:58 UTC 2006
On Fri, Oct 06, 2006 at 08:18:52AM -0400, Clint Adams wrote:
> > Bug#379153: libnss-db: memory leak
> > Bug reassigned from package `libnss-db' to `libdb4.4'.
>
> I would suggest as a workaround that the db-upgrade patch be modified
> to only run an upgrade if the open call returns DB_OLD_VERSION.
Good idea - I'd suggest:
diff -urN libnss-db-2.2.3pre1.orig/src/db-compat.c libnss-db-2.2.3pre1/src/db-compat.c
--- libnss-db-2.2.3pre1.orig/src/db-compat.c 2001-04-29 19:07:41.000000000 -0600
+++ libnss-db-2.2.3pre1/src/db-compat.c 2006-10-06 18:02:55.000000000 -0600
@@ -40,6 +40,11 @@
return err;
err = db->open (db, file, NULL, type, flags, mode);
+ /* Make sure we upgrade, in case this is an older database */
+ if (err == DB_OLD_VERSION)
+ {
+ err = db->upgrade(db, file, 0);
+ }
if (err)
{
db->close (db, 0);
--
dann frazier
More information about the Pkg-db-devel
mailing list