diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-07-15 08:36:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:19:22 -0500 |
commit | 4f33673b41437959dc0c37768805bd176472e4ac (patch) | |
tree | fcdd21a86150062ab9b0bd924af8f171d8add37d /source3/registry | |
parent | 354e444ee3dcd5745d94d299edef4726941efb8f (diff) | |
download | samba-4f33673b41437959dc0c37768805bd176472e4ac.tar.gz samba-4f33673b41437959dc0c37768805bd176472e4ac.tar.bz2 samba-4f33673b41437959dc0c37768805bd176472e4ac.zip |
r17047: Fix a typo and a possible NULL dereference
(This used to be commit c0d9114706345c6bc1fa392bbf9ee81b146cba85)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_db.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 5484c238b6..d73b27521d 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -229,7 +229,7 @@ BOOL regdb_init( void ) /* always setup the necessary keys and values */ if ( !init_registry_data() ) { - DEBUG(0,("init_registry: Failed to initiailize data in registry!\n")); + DEBUG(0,("init_registry: Failed to initialize data in registry!\n")); return False; } @@ -313,7 +313,9 @@ static BOOL regdb_store_keys_internal( const char *key, REGSUBKEY_CTR *ctr ) /* allocate some initial memory */ - buffer = SMB_MALLOC(sizeof(pstring)); + if (!(buffer = SMB_MALLOC(sizeof(pstring)))) { + return False; + } buflen = sizeof(pstring); len = 0; |