summaryrefslogtreecommitdiff
path: root/source3/registry/reg_frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry/reg_frontend.c')
-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 )