diff options
author | Jeremy Allison <jra@samba.org> | 2007-05-22 20:20:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:22:43 -0500 |
commit | 71ee55f98d87ff70e5feb0d2b280e9c71f7b9b6a (patch) | |
tree | 873d148c4731b4d909d3bc1f50ddab49f5849182 /source3/registry | |
parent | 725e90f1572be8734c321a3d638abdf778038349 (diff) | |
download | samba-71ee55f98d87ff70e5feb0d2b280e9c71f7b9b6a.tar.gz samba-71ee55f98d87ff70e5feb0d2b280e9c71f7b9b6a.tar.bz2 samba-71ee55f98d87ff70e5feb0d2b280e9c71f7b9b6a.zip |
r23080: Fix bug #4637 - we hads missed some cases where
we were calling PRS_ALLOC_MEM with zero count.
Jeremy.
(This used to be commit 9a10736e6fa276ca4b0726fbb7baf0daafbdc46d)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/regfio.c | 8 |
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++ ) { |