From 76b320c8dfedf9912f0f22a662d765510acb5054 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 19 Nov 2006 10:54:57 +0000 Subject: r19779: Fail properly on talloc_strdup failure (This used to be commit b57e446789530cb7e18e107478ca8b59a19d990f) --- source3/registry/reg_frontend.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/registry/reg_frontend.c') 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 ) -- cgit