mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
net: Fix CID 1128559 Dereference null return value
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
cfe8fa2c75
commit
67c31842b0
@ -915,6 +915,7 @@ static struct functable net_func[] = {
|
|||||||
const char **argv_const = discard_const_p(const char *, argv);
|
const char **argv_const = discard_const_p(const char *, argv);
|
||||||
poptContext pc;
|
poptContext pc;
|
||||||
TALLOC_CTX *frame = talloc_stackframe();
|
TALLOC_CTX *frame = talloc_stackframe();
|
||||||
|
struct tevent_context *ev;
|
||||||
struct net_context *c = talloc_zero(frame, struct net_context);
|
struct net_context *c = talloc_zero(frame, struct net_context);
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
@ -1036,9 +1037,12 @@ static struct functable net_func[] = {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = messaging_init_client(c,
|
ev = samba_tevent_context_init(c);
|
||||||
samba_tevent_context_init(c),
|
if (ev == NULL) {
|
||||||
&c->msg_ctx);
|
d_fprintf(stderr, "samba_tevent_context_init failed\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
status = messaging_init_client(c, ev, &c->msg_ctx);
|
||||||
if (geteuid() != 0 &&
|
if (geteuid() != 0 &&
|
||||||
NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
|
NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user