summaryrefslogtreecommitdiff
path: root/src/common/ers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/ers.c')
-rw-r--r--src/common/ers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/ers.c b/src/common/ers.c
index 22269a51f..a7dad49ab 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -40,6 +40,7 @@
* @see common#ers.h *
\*****************************************************************************/
#include <stdlib.h>
+#include <string.h>
#include "../common/cbasetypes.h"
#include "../common/malloc.h" // CREATE, RECREATE, aMalloc, aFree
@@ -238,6 +239,9 @@ static void ers_obj_free_entry(ERS self, void *entry)
return;
}
+ if( instance->Options & ERS_OPT_CLEAN )
+ memset((unsigned char*)reuse + sizeof(struct ers_list), 0, instance->Cache->ObjectSize - sizeof(struct ers_list));
+
reuse->Next = instance->Cache->ReuseList;
instance->Cache->ReuseList = reuse;
instance->Count--;