--- parser3/src/lib/sdbm/sdbm.c 2003/11/06 09:09:30 1.2 +++ parser3/src/lib/sdbm/sdbm.c 2008/01/25 18:59:38 1.4 @@ -71,7 +71,7 @@ #include "sdbm_private.h" #include /* for memset() */ -#include /* for malloc() and free() */ +// #include /* for malloc() and free() */ /* * forward @@ -120,7 +120,7 @@ static apr_status_t database_cleanup(voi (void) apr_file_unlock(db->dirf); (void) apr_file_close(db->dirf); (void) apr_file_close(db->pagf); - free(db); +// free(db); // libcg will do it return APR_SUCCESS; } @@ -133,8 +133,9 @@ static apr_status_t prep(apr_sdbm_t **pd *pdb = NULL; - db = malloc(sizeof(*db)); - memset(db, 0, sizeof(*db)); +// db = malloc(sizeof(*db)); +// memset(db, 0, sizeof(*db)); + db = apr_malloc(sizeof(*db)); db->pool = p; @@ -205,7 +206,7 @@ error: if (db->pagf != NULL) { (void) apr_file_close(db->pagf); } - free(db); +// free(db); // libcg will do it return status; } @@ -273,7 +274,7 @@ APU_DECLARE(apr_status_t) apr_sdbm_delet if ((status = getpage(db, exhash(key))) == APR_SUCCESS) { if (!delpair(db->pagbuf, key)) /* ### should we define some APRUTIL codes? */ - status = APR_EGENERAL; + status = APR_SUCCESS; /* PAF: were APR_EGENERAL, contradicting comment in .h file :( */ else status = write_page(db, db->pagbuf, db->pagbno); }