summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2007-08-13 15:41:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:45 -0500
commit803f8a7dcf85fd325611b854c3df5bd008fcf905 (patch)
tree42a9e02a22be560016e75b6ed16f682036a563b4 /source4
parente6c02fc3ed5aef2c34e1f59149f4eac3ceb651e0 (diff)
downloadsamba-803f8a7dcf85fd325611b854c3df5bd008fcf905.tar.gz
samba-803f8a7dcf85fd325611b854c3df5bd008fcf905.tar.bz2
samba-803f8a7dcf85fd325611b854c3df5bd008fcf905.zip
r24369: Don't use goto in wb_name2domain, fix wb_samba3_split_names call.
Missed this one on my previous name2domain cleanup patch. (This used to be commit 4305fab4a20dd765e5874507887e3d489c40a055)
Diffstat (limited to 'source4')
-rw-r--r--source4/winbind/wb_name2domain.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/winbind/wb_name2domain.c b/source4/winbind/wb_name2domain.c
index bfab7393bb..b100709223 100644
--- a/source4/winbind/wb_name2domain.c
+++ b/source4/winbind/wb_name2domain.c
@@ -41,30 +41,30 @@ struct composite_context *wb_name2domain_send(TALLOC_CTX *mem_ctx,
struct composite_context *result, *ctx;
struct name2domain_state *state;
char *user_dom, *user_name;
+ bool ok;
DEBUG(5, ("wb_name2domain_send called\n"));
result = composite_create(mem_ctx, service->task->event_ctx);
- if (result == NULL) goto failed;
+ if (!result) return NULL;
state = talloc(result, struct name2domain_state);
- if (state == NULL) goto failed;
+ if (composite_nomem(state, result)) return result;
state->ctx = result;
result->private_data = state;
state->service = service;
- if(!wb_samba3_split_username(state, name, &user_dom, &user_name))
- goto failed;
+ ok = wb_samba3_split_username(state, name, &user_dom, &user_name);
+ if(!ok) {
+ composite_error(state->ctx, NT_STATUS_OBJECT_NAME_INVALID);
+ return result;
+ }
ctx = wb_cmd_lookupname_send(state, service, user_dom, user_name);
- if (ctx == NULL) goto failed;
+ if (composite_nomem(ctx, state->ctx)) return result;
composite_continue(result, ctx, name2domain_recv_sid, state);
return result;
-
-failed:
- talloc_free(result);
- return NULL;
}
static void name2domain_recv_sid(struct composite_context *ctx)