summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-19 10:54:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:55 -0500
commit76b320c8dfedf9912f0f22a662d765510acb5054 (patch)
tree34103690632370269657dfcd3d2f622b1258a146 /source3/registry
parente82cd437cc3c93e25f56d3326d6ba527a33ebfbf (diff)
downloadsamba-76b320c8dfedf9912f0f22a662d765510acb5054.tar.gz
samba-76b320c8dfedf9912f0f22a662d765510acb5054.tar.bz2
samba-76b320c8dfedf9912f0f22a662d765510acb5054.zip
r19779: Fail properly on talloc_strdup failure
(This used to be commit b57e446789530cb7e18e107478ca8b59a19d990f)
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_frontend.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c
index 14531b52f7..d79e75b995 100644
--- a/source3/registry/reg_frontend.c
+++ b/source3/registry/reg_frontend.c
@@ -369,9 +369,11 @@ WERROR regkey_open_internal( TALLOC_CTX *mem_ctx,
/* initialization */
keyinfo->type = REG_KEY_GENERIC;
- keyinfo->name = talloc_strdup( keyinfo, path );
-
-
+ if (!(keyinfo->name = talloc_strdup(keyinfo, path))) {
+ result = WERR_NOMEM;
+ goto done;
+ }
+
/* Tag this as a Performance Counter Key */
if( StrnCaseCmp(path, KEY_HKPD, strlen(KEY_HKPD)) == 0 )