summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-17 16:01:07 -0400
committerSimo Sorce <idra@samba.org>2010-07-21 19:13:27 -0400
commit3b502d899d8924d285e72f8a9fe666865d6f6926 (patch)
tree752b9e10fa31ce064044a4ff5a7c70e5450d7aa3 /source3
parenta3713d746949788c393ecf2b0d10d105c2220b22 (diff)
downloadsamba-3b502d899d8924d285e72f8a9fe666865d6f6926.tar.gz
samba-3b502d899d8924d285e72f8a9fe666865d6f6926.tar.bz2
samba-3b502d899d8924d285e72f8a9fe666865d6f6926.zip
s3-dcerpc: Fix potential memleak
Use a free function for schannel data too for now.
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_pipe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index b25f122e56..508cb3f36a 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -89,6 +89,11 @@ static void free_pipe_ntlmssp_auth_data(struct pipe_auth_data *auth)
TALLOC_FREE(auth->a_u.auth_ntlmssp_state);
}
+static void free_pipe_schannel_auth_data(struct pipe_auth_data *auth)
+{
+ TALLOC_FREE(auth->a_u.schannel_auth);
+}
+
static DATA_BLOB generic_session_key(void)
{
return data_blob("SystemLibraryDTC", 16);
@@ -1100,7 +1105,7 @@ static bool pipe_schannel_auth_bind(pipes_struct *p,
neg.oem_netbios_domain.a, neg.oem_netbios_computer.a));
/* We're finished with this bind - no more packets. */
- p->auth.auth_data_free_func = NULL;
+ p->auth.auth_data_free_func = &free_pipe_schannel_auth_data;
p->auth.auth_type = PIPE_AUTH_TYPE_SCHANNEL;
p->pipe_bound = True;