summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-15 08:36:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:22 -0500
commitc0d9114706345c6bc1fa392bbf9ee81b146cba85 (patch)
tree08f09e54d25a54e438fc52cbb708bf51440a28a1 /source
parenta8df1863bf2817a82a55c816ba1f685828c5b6ec (diff)
downloadsamba-c0d9114706345c6bc1fa392bbf9ee81b146cba85.tar.gz
samba-c0d9114706345c6bc1fa392bbf9ee81b146cba85.tar.xz
samba-c0d9114706345c6bc1fa392bbf9ee81b146cba85.zip
r17047: Fix a typo and a possible NULL dereference
Diffstat (limited to 'source')
-rw-r--r--source/registry/reg_db.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/registry/reg_db.c b/source/registry/reg_db.c
index 5484c238b60..d73b27521d4 100644
--- a/source/registry/reg_db.c
+++ b/source/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;