summaryrefslogtreecommitdiff
path: root/source3/registry/regfio.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry/regfio.c')
-rw-r--r--source3/registry/regfio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index 3a554177a4..3e3e7e480c 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -642,8 +642,12 @@ static BOOL hbin_prs_lf_records( const char *desc, REGF_HBIN *hbin, int depth, R
return False;
if ( UNMARSHALLING(&hbin->ps) ) {
- if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) )
- return False;
+ if (lf->num_keys) {
+ if ( !(lf->hashes = PRS_ALLOC_MEM( &hbin->ps, REGF_HASH_REC, lf->num_keys )) )
+ return False;
+ } else {
+ lf->hashes = NULL;
+ }
}
for ( i=0; i<lf->num_keys; i++ ) {