summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/regfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index dc69b3f9ed..d2035228ae 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -1504,7 +1504,7 @@ static REGF_HBIN* find_free_space( REGF_FILE *file, uint32 size )
/* allocate in multiples of REGF_ALLOC_BLOCK; make sure (size + hbin_header) fits */
- alloc_size = ((size+HBIN_HEADER_REC_SIZE) / REGF_ALLOC_BLOCK ) + REGF_ALLOC_BLOCK;
+ alloc_size = (((size+HBIN_HEADER_REC_SIZE) / REGF_ALLOC_BLOCK ) + 1 ) * REGF_ALLOC_BLOCK;
if ( !(hbin = regf_hbin_allocate( file, alloc_size )) ) {
DEBUG(0,("find_free_space: regf_hbin_allocate() failed!\n"));