summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-26 06:44:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:17 -0500
commit3ea916b2278c202c99c80c02e80e588bd7daedb8 (patch)
tree95cb6b71a66de1101c568b77b32bd636b2a51b1f /source4/libcli
parentdbc2346de8b2f213d8bb7e647c4f187c6103e474 (diff)
downloadsamba-3ea916b2278c202c99c80c02e80e588bd7daedb8.tar.gz
samba-3ea916b2278c202c99c80c02e80e588bd7daedb8.tar.bz2
samba-3ea916b2278c202c99c80c02e80e588bd7daedb8.zip
r2654: fixed some more server memory leaks. We are now down to a single leak
of 16 bytes, caused by the 16 byte data_blob in the smb_signing code. (This used to be commit 2f1b788e09686e065d22f621f5c0c585192c6740)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/cliconnect.c2
-rw-r--r--source4/libcli/raw/clisession.c2
-rw-r--r--source4/libcli/raw/clisocket.c2
-rw-r--r--source4/libcli/raw/clitransport.c2
-rw-r--r--source4/libcli/raw/clitree.c2
-rw-r--r--source4/libcli/raw/rawrequest.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/source4/libcli/cliconnect.c b/source4/libcli/cliconnect.c
index 66882f605d..27caaa9df9 100644
--- a/source4/libcli/cliconnect.c
+++ b/source4/libcli/cliconnect.c
@@ -211,7 +211,7 @@ struct smbcli_state *smbcli_state_init(void)
{
struct smbcli_state *cli;
- cli = talloc_named(NULL, sizeof(*cli), "smbcli_state");
+ cli = talloc_p(NULL, struct smbcli_state);
if (cli) {
ZERO_STRUCTP(cli);
}
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c
index 37992968a4..75b9645018 100644
--- a/source4/libcli/raw/clisession.c
+++ b/source4/libcli/raw/clisession.c
@@ -33,7 +33,7 @@ struct smbcli_session *smbcli_session_init(struct smbcli_transport *transport)
{
struct smbcli_session *session;
- session = talloc_named(NULL, sizeof(*session), "smbcli_session");
+ session = talloc_p(transport, struct smbcli_session);
if (!session) {
return NULL;
}
diff --git a/source4/libcli/raw/clisocket.c b/source4/libcli/raw/clisocket.c
index 654d8ee61b..5663672333 100644
--- a/source4/libcli/raw/clisocket.c
+++ b/source4/libcli/raw/clisocket.c
@@ -29,7 +29,7 @@ struct smbcli_socket *smbcli_sock_init(void)
{
struct smbcli_socket *sock;
- sock = talloc_named(NULL, sizeof(*sock), "smbcli_socket");
+ sock = talloc_p(NULL, struct smbcli_socket);
if (!sock) {
return NULL;
}
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 85d5337da7..c0d84179d6 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -49,7 +49,7 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock)
struct smbcli_transport *transport;
struct fd_event fde;
- transport = talloc_named(NULL, sizeof(*transport), "smbcli_transport");
+ transport = talloc_p(sock, struct smbcli_transport);
if (!transport) return NULL;
ZERO_STRUCTP(transport);
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 03a49708b3..c383eef768 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -34,7 +34,7 @@ struct smbcli_tree *smbcli_tree_init(struct smbcli_session *session)
{
struct smbcli_tree *tree;
- tree = talloc_named(NULL, sizeof(*tree), "smbcli_tree");
+ tree = talloc_p(session, struct smbcli_tree);
if (!tree) {
return NULL;
}
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 1ff36d0a8d..a94e796628 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -62,7 +62,7 @@ struct smbcli_request *smbcli_request_setup_nonsmb(struct smbcli_transport *tran
{
struct smbcli_request *req;
- req = talloc_named(NULL, sizeof(struct smbcli_request), "smcli_request");
+ req = talloc_p(transport, struct smbcli_request);
if (!req) {
return NULL;
}