diff options
author | Garming Sam <garming@catalyst.net.nz> | 2014-02-14 18:04:22 +1300 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-03-05 16:33:22 +0100 |
commit | 0b8213ae1cd0129b7a50cf7ba3605512a990520f (patch) | |
tree | e30b7e9f85f1f391060101a833928904f44dbed0 /source4/rpc_server | |
parent | 856c74e013eaa53902479b771e6c0cf1fea67745 (diff) | |
download | samba-0b8213ae1cd0129b7a50cf7ba3605512a990520f.tar.gz samba-0b8213ae1cd0129b7a50cf7ba3605512a990520f.tar.xz samba-0b8213ae1cd0129b7a50cf7ba3605512a990520f.zip |
Remove all uses of the NT_STATUS_NOT_OK_RETURN_AND_FREE macro from the codebase.
Following the current coding guidelines, it is considered bad practice to return from
within a macro and change control flow as they look like normal function calls.
Change-Id: I421e169275fe323e2b019c6cc5d386289aec07f7
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index c1ddd90a58..6063ebe09b 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -84,7 +84,10 @@ static NTSTATUS dcesrv_build_lsa_sd(TALLOC_CTX *mem_ctx, TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx); status = dom_sid_split_rid(tmp_ctx, sid, &domain_sid, &rid); - NT_STATUS_NOT_OK_RETURN_AND_FREE(status, tmp_ctx); + if (!NT_STATUS_IS_OK(status)) { + TALLOC_FREE(tmp_ctx); + return status; + } domain_admins_sid = dom_sid_add_rid(tmp_ctx, domain_sid, DOMAIN_RID_ADMINS); if (domain_admins_sid == NULL) { |