aboutsummaryrefslogtreecommitdiff
path: root/compat/dbmclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/dbmclose.c')
-rw-r--r--compat/dbmclose.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/compat/dbmclose.c b/compat/dbmclose.c
index b4114d3..1d2d31c 100644
--- a/compat/dbmclose.c
+++ b/compat/dbmclose.c
@@ -19,14 +19,18 @@
/* Include system configuration before all else. */
#include "autoconf.h"
-
+#include "ndbm.h"
#include "gdbmdefs.h"
-
/* Close the DBF file. */
void
-dbm_close (GDBM_FILE dbf)
+dbm_close (DBM *dbm)
{
- gdbm_close (dbf);
+ gdbm_close (dbm->file);
+ if (dbm->_dbm_memory.dptr)
+ free (dbm->_dbm_memory.dptr);
+ if (dbm->_dbm_fetch_val)
+ free (dbm->_dbm_fetch_val);
+ free (dbm);
}

Return to:

Send suggestions and report system problems to the System administrator.