svn rev #24688: trunk/src/appl/user_user/
epeisach@MIT.EDU
epeisach at MIT.EDU
Sun Mar 6 08:29:54 EST 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=24688
Commit By: epeisach
Log Message:
Clean up memory leaks at end of program. No leaks now on success.
Changed Files:
U trunk/src/appl/user_user/client.c
U trunk/src/appl/user_user/server.c
Modified: trunk/src/appl/user_user/client.c
===================================================================
--- trunk/src/appl/user_user/client.c 2011-03-06 13:29:05 UTC (rev 24687)
+++ trunk/src/appl/user_user/client.c 2011-03-06 13:29:54 UTC (rev 24688)
@@ -278,5 +278,17 @@
}
printf ("uu-client: server says \"%s\".\n", msg.data);
+
+
+ krb5_free_ticket(context, ticket);
+ krb5_free_host_realm(context, srealms);
+ free(hname);
+ krb5_free_cred_contents(context, &creds);
+ krb5_free_creds(context, new_creds);
+ krb5_free_data_contents(context, &msg);
+ krb5_free_data_contents(context, &reply);
+ krb5_cc_close(context, cc);
+ krb5_auth_con_free(context, auth_context);
+ krb5_free_context(context);
return 0;
}
Modified: trunk/src/appl/user_user/server.c
===================================================================
--- trunk/src/appl/user_user/server.c 2011-03-06 13:29:05 UTC (rev 24687)
+++ trunk/src/appl/user_user/server.c 2011-03-06 13:29:54 UTC (rev 24688)
@@ -238,5 +238,14 @@
return 7;
}
+
+ krb5_free_data_contents(context, &msg);
+ krb5_free_data_contents(context, &pname_data);
+ /* tkt_data freed with creds */
+ krb5_free_cred_contents(context, &creds);
+ krb5_free_creds(context, new_creds);
+ krb5_cc_close(context, cc);
+ krb5_auth_con_free(context, auth_context);
+ krb5_free_context(context);
return 0;
}
More information about the cvs-krb5
mailing list