aboutsummaryrefslogtreecommitdiff
path: root/compat/dbmclose.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:29:42 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:29:42 +0000
commit9839c83761c573414d77de1b957bae04547bc910 (patch)
tree5698520af3c5170d3d6b971948c61899dab75d70 /compat/dbmclose.c
parent39cc2512acbcf56ffbf87e3d26afc0450ca37de9 (diff)
downloadgdbm-9839c83761c573414d77de1b957bae04547bc910.tar.gz
gdbm-9839c83761c573414d77de1b957bae04547bc910.tar.bz2
Include nbdm.h.
Use the new DBM declaration.
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.