summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-02-09 14:08:34 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-02-09 16:42:19 +0100
commit1b5609aa4d72fe3e8bd916440844cc380d75d96a (patch)
tree24379db0e8c5d06668ef74b95515ae8fe65d67c0 /source3
parentd8a90b499b5f815d5355148b0658c0a075744171 (diff)
downloadsamba-1b5609aa4d72fe3e8bd916440844cc380d75d96a.tar.gz
samba-1b5609aa4d72fe3e8bd916440844cc380d75d96a.tar.bz2
samba-1b5609aa4d72fe3e8bd916440844cc380d75d96a.zip
s3-rpc_server: Fixed possible segfault with client_id.
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/rpc_server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 5be0e5e07d..9a7ff099da 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -98,6 +98,12 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx,
}
strlcpy(p->client_id->addr,
client_address, sizeof(p->client_id->addr));
+ p->client_id->name = talloc_strdup(p->client_id, client_address);
+ if (p->client_id->name == NULL) {
+ TALLOC_FREE(p);
+ *perrno = ENOMEM;
+ return -1;
+ }
talloc_set_destructor(p, close_internal_rpc_pipe_hnd);