summaryrefslogtreecommitdiff
path: root/source3/locking/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/locking/shmem.c')
-rw-r--r--source3/locking/shmem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/locking/shmem.c b/source3/locking/shmem.c
index be8e22108a..6015085fe4 100644
--- a/source3/locking/shmem.c
+++ b/source3/locking/shmem.c
@@ -41,7 +41,7 @@ extern int DEBUGLEVEL;
#define SHM_FILE_MODE 0644
#endif
-#define SHMEM_HASH_SIZE 113
+#define SHMEM_HASH_SIZE 13
/* WARNING : offsets are used because mmap() does not guarantee that all processes have the
@@ -606,6 +606,9 @@ static BOOL smb_shm_free(int offset)
DEBUG(6,("smb_shm_free : freeing %d bytes at offset %d\n",header_p->size*CellSize,offset));
+ /* zero the area being freed - this allows us to find bugs faster */
+ memset(smb_shm_offset2addr(offset), 0, header_p->size*CellSize);
+
if ( scanner_p == prev_p )
{
smb_shm_header_p->statistics.cells_free += header_p->size;