summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-12-06 15:11:09 +0100
committerGünther Deschner <gd@samba.org>2012-12-12 15:00:02 +0100
commitaf18339e037e388ddac4a417544c295bcc44b31d (patch)
tree86f3284282dfa717a86e5f4fe6edf89f7d63be17 /source4/libnet
parent3bcd14c3970f3be58d8f0d802b905c64661173a6 (diff)
downloadsamba-af18339e037e388ddac4a417544c295bcc44b31d.tar.gz
samba-af18339e037e388ddac4a417544c295bcc44b31d.tar.bz2
samba-af18339e037e388ddac4a417544c295bcc44b31d.zip
s4-libnet: Don't call talloc_get_type() for the same struct twice.
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_rpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c
index 349e1f8664..13115288b1 100644
--- a/source4/libnet/libnet_rpc.c
+++ b/source4/libnet/libnet_rpc.c
@@ -189,11 +189,11 @@ static NTSTATUS libnet_RpcConnectSrv_recv(struct composite_context *c,
struct libnet_RpcConnect *r)
{
NTSTATUS status;
- struct rpc_connect_srv_state *s = talloc_get_type(c->private_data,
- struct rpc_connect_srv_state);
status = composite_wait(c);
if (NT_STATUS_IS_OK(status)) {
+ struct rpc_connect_srv_state *s;
+
/* move the returned rpc pipe between memory contexts */
s = talloc_get_type(c->private_data, struct rpc_connect_srv_state);
r->out.dcerpc_pipe = talloc_steal(mem_ctx, s->r.out.dcerpc_pipe);