summaryrefslogtreecommitdiff
path: root/ext/dba/dba_db4.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dba/dba_db4.c')
-rw-r--r--ext/dba/dba_db4.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c
index 2c2da4052..bdf9cdfbd 100644
--- a/ext/dba/dba_db4.c
+++ b/ext/dba/dba_db4.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba_db4.c,v 1.15.2.3.2.1.2.4 2009/05/13 02:14:53 felipe Exp $ */
+/* $Id: dba_db4.c 286636 2009-08-01 23:10:11Z felipe $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -175,7 +175,15 @@ DBA_EXISTS_FUNC(db4)
DB4_GKEY;
memset(&gval, 0, sizeof(gval));
+
+ if (info->flags & DBA_PERSISTENT) {
+ gval.flags |= DB_DBT_MALLOC;
+ }
+
if (!dba->dbp->get(dba->dbp, NULL, &gkey, &gval, 0)) {
+ if (info->flags & DBA_PERSISTENT) {
+ free(gval.data);
+ }
return SUCCESS;
}
return FAILURE;