1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-29 13:49:30 +03:00

s3-rpc_server: Fixed possible segfault with client_id.

This commit is contained in:
Andreas Schneider
2011-02-09 14:08:34 +01:00
committed by Andreas Schneider
parent d8a90b499b
commit 1b5609aa4d

View File

@ -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);