git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a7e730d
)
s3:registry: untangle assignments from checks in reg_createkey() (cherry picked from...
author
Michael Adam
<obnox@samba.org>
Thu, 12 Apr 2012 15:58:26 +0000
(17:58 +0200)
committer
Karolin Seeger
<kseeger@samba.org>
Fri, 22 Jun 2012 19:41:18 +0000
(21:41 +0200)
(cherry picked from commit
95ba1aa132e6097a0d35cbc05296427aebdf21b1
)
source3/registry/reg_api.c
patch
|
blob
|
history
diff --git
a/source3/registry/reg_api.c
b/source3/registry/reg_api.c
index 2eced2698b829ce301b8079588672b6282057f22..b8d8f2cc29f6873fbf682626f6f880b7eef9850d 100644
(file)
--- a/
source3/registry/reg_api.c
+++ b/
source3/registry/reg_api.c
@@
-568,9
+568,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;
}