summaryrefslogtreecommitdiffstats
path: root/source/smbd/mangle.c
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-05-06 19:22:45 +0000
committerChristopher R. Hertel <crh@samba.org>1998-05-06 19:22:45 +0000
commit95f7b03285c42e8f5573690939b79afc7e686908 (patch)
tree02a2a0dd3188597e8c19cb0a46cda7aa1ac78fcd /source/smbd/mangle.c
parentd28427f21fff49da6b38c24625e3e2dae49a9713 (diff)
downloadsamba-95f7b03285c42e8f5573690939b79afc7e686908.tar.gz
samba-95f7b03285c42e8f5573690939b79afc7e686908.tar.xz
samba-95f7b03285c42e8f5573690939b79afc7e686908.zip
Andrew redefines the free() function to do some memory management testing.
He also suggested that some systems may implement free() as a macro (but I think he was looking for an excuse ;). Anyway, I've added a function to mangle.c that calls free(). Chris -)-----
Diffstat (limited to 'source/smbd/mangle.c')
-rw-r--r--source/smbd/mangle.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c
index 3953da54eab..eb267faab3a 100644
--- a/source/smbd/mangle.c
+++ b/source/smbd/mangle.c
@@ -473,6 +473,24 @@ static signed int cache_compare( ubi_btItemPtr ItemPtr, ubi_btNodePtr NodePtr )
} /* cache_compare */
/* ************************************************************************** **
+ * Free a cache entry.
+ *
+ * Input: WarrenZevon - Pointer to the entry that is to be returned to
+ * Nirvana.
+ * Output: none.
+ *
+ * Notes: This function gets around the possibility that the standard
+ * free() function may be implemented as a macro, or other evil
+ * subversions (oh, so much fun).
+ *
+ * ************************************************************************** **
+ */
+static void cache_free_entry( ubi_trNodePtr WarrenZevon )
+ {
+ free( WarrenZevon );
+ } /* cache_free_entry */
+
+/* ************************************************************************** **
* Initializes or clears the mangled cache.
*
* Input: none.
@@ -494,7 +512,7 @@ void reset_mangled_cache( void )
{
(void)ubi_cacheInit( mangled_cache,
cache_compare,
- (ubi_trKillNodeRtn)free,
+ cache_free_entry,
MANGLED_CACHE_MAX_ENTRIES,
MANGLED_CACHE_MAX_MEMORY );
mc_initialized = True;