summaryrefslogtreecommitdiffstats
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-04-12 17:58:26 +0200
committerAndreas Schneider <asn@samba.org>2012-04-25 14:31:10 +0200
commit1af68be008a11bffdf78d70c8d1635003a3c4407 (patch)
tree520944cb8b830084da19b5ca49322738a1a65c35 /source3/registry
parent8d19ac7474e67eb8ffccb717c177c952e10e88e3 (diff)
downloadsamba-1af68be008a11bffdf78d70c8d1635003a3c4407.tar.gz
samba-1af68be008a11bffdf78d70c8d1635003a3c4407.tar.xz
samba-1af68be008a11bffdf78d70c8d1635003a3c4407.zip
s3:registry: untangle assignments from checks in reg_createkey()
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/registry')
-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;
}