diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-11-18 23:27:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:28 -0500 |
commit | f8391489bfbeea20e450b9ec7640c3e04c713ced (patch) | |
tree | 37fb5d2275a516ec1f54e42f7b003dae073c9481 /source4/libnet/libnet_rpc.c | |
parent | 552c0111a10c70d2ca24c996838d41d79494969f (diff) | |
download | samba-f8391489bfbeea20e450b9ec7640c3e04c713ced.tar.gz samba-f8391489bfbeea20e450b9ec7640c3e04c713ced.tar.bz2 samba-f8391489bfbeea20e450b9ec7640c3e04c713ced.zip |
r11794: - fixed a valgrind error in libnet, caused by using a stack variable
after the function has returned (the *address variable was assigned
into the state).
- changed libnet to use event_context_find() instead of
event_context_init(), so it works as a child of existing code that
uses a event context
(This used to be commit 47ceb2d3558304b4c4fb00582fb25a885cea2ef5)
Diffstat (limited to 'source4/libnet/libnet_rpc.c')
-rw-r--r-- | source4/libnet/libnet_rpc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c index 7b07cedeac..9917b17255 100644 --- a/source4/libnet/libnet_rpc.c +++ b/source4/libnet/libnet_rpc.c @@ -77,11 +77,10 @@ static NTSTATUS libnet_RpcConnectPdc(struct libnet_context *ctx, TALLOC_CTX *mem NTSTATUS status; struct libnet_RpcConnect r2; struct libnet_Lookup f; - const char *address = talloc_array(ctx, const char, 16); f.in.hostname = r->in.domain_name; f.in.methods = NULL; - f.out.address = &address; + f.out.address = NULL; status = libnet_LookupPdc(ctx, mem_ctx, &f); if (!NT_STATUS_IS_OK(status)) { @@ -91,7 +90,7 @@ static NTSTATUS libnet_RpcConnectPdc(struct libnet_context *ctx, TALLOC_CTX *mem } r2.level = LIBNET_RPC_CONNECT_SERVER; - r2.in.domain_name = talloc_strdup(mem_ctx, *f.out.address); + r2.in.domain_name = talloc_strdup(mem_ctx, f.out.address[0]); r2.in.dcerpc_iface_name = r->in.dcerpc_iface_name; r2.in.dcerpc_iface_uuid = r->in.dcerpc_iface_uuid; r2.in.dcerpc_iface_version = r->in.dcerpc_iface_version; |