summaryrefslogtreecommitdiff
path: root/source3/registry/reg_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry/reg_api.c')
-rw-r--r--source3/registry/reg_api.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 0bffbda502..3d051b3f2d 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -569,9 +569,13 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
char *path, *end;
WERROR err;
- if (!(mem_ctx = talloc_new(ctx))) return WERR_NOMEM;
+ mem_ctx = talloc_new(ctx);
+ if (mem_ctx == NULL) {
+ return WERR_NOMEM;
+ }
- if (!(path = talloc_strdup(mem_ctx, subkeypath))) {
+ path = talloc_strdup(mem_ctx, subkeypath);
+ if (path == NULL) {
err = WERR_NOMEM;
goto done;
}