From d8ab44685994b302bb46eed9001c72c194d13dc8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 15 Aug 2003 01:46:09 +0000 Subject: Fix memleaks. Currently I'm compiling against MIT Kerberos 1.2.8. Anthony, you said you have a heimdal installation available. Could you please compile this stuff with krb and check it with valgrind? Thanks, Volker --- source/smbd/sesssetup.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/smbd') diff --git a/source/smbd/sesssetup.c b/source/smbd/sesssetup.c index 0b3d42302aa..1435c38c99d 100644 --- a/source/smbd/sesssetup.c +++ b/source/smbd/sesssetup.c @@ -171,6 +171,7 @@ static int reply_spnego_kerberos(connection_struct *conn, } data_blob_free(&auth_data); + data_blob_free(&ticket); DEBUG(3,("Ticket name is [%s]\n", client)); @@ -178,6 +179,7 @@ static int reply_spnego_kerberos(connection_struct *conn, if (!p) { DEBUG(3,("Doesn't look like a valid principal\n")); data_blob_free(&ap_rep); + SAFE_FREE(client); return ERROR_NT(NT_STATUS_LOGON_FAILURE); } @@ -186,6 +188,7 @@ static int reply_spnego_kerberos(connection_struct *conn, DEBUG(3,("Ticket for foreign realm %s@%s\n", client, p+1)); if (!lp_allow_trusted_domains()) { data_blob_free(&ap_rep); + SAFE_FREE(client); return ERROR_NT(NT_STATUS_LOGON_FAILURE); } foreign = True; @@ -202,6 +205,8 @@ static int reply_spnego_kerberos(connection_struct *conn, user = smb_xstrdup(client); } + SAFE_FREE(client); + /* setup the string used by %U */ sub_set_smb_name(user); -- cgit