From 3b502d899d8924d285e72f8a9fe666865d6f6926 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 17 Jul 2010 16:01:07 -0400 Subject: s3-dcerpc: Fix potential memleak Use a free function for schannel data too for now. --- source3/rpc_server/srv_pipe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/rpc_server') 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; -- cgit