cc_ccache_iterator_release and cc_credentials_iterator leak memory on the
CCacheServer because they do not send an ipc message to the server telling it
to free up resources associated with the iterator.
Note: this issue does not track needing to be able to free up these same
resources when the client crashes.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20276
dc483132-0cff-0310-8789-
dd5450dbe970
if (!io_ccache_iterator) { err = ccErrBadParam; }
+ if (!err) {
+ cc_uint32 initialized = 0;
+
+ err = cci_identifier_is_initialized (ccache_iterator->identifier,
+ &initialized);
+
+ if (!err && initialized) {
+ err = cci_ipc_send (cci_ccache_iterator_release_msg_id,
+ ccache_iterator->identifier,
+ NULL,
+ NULL);
+ if (err) {
+ cci_debug_printf ("%s: cci_ipc_send failed with error %d",
+ __FUNCTION__, err);
+ err = ccNoError;
+ }
+ }
+ }
+
if (!err) {
free ((char *) ccache_iterator->functions);
cci_identifier_release (ccache_iterator->identifier);
if (!io_credentials_iterator) { err = ccErrBadParam; }
+ if (!err) {
+ err = cci_ipc_send (cci_credentials_iterator_next_msg_id,
+ credentials_iterator->identifier,
+ NULL,
+ NULL);
+ if (err) {
+ cci_debug_printf ("%s: cci_ipc_send failed with error %d",
+ __FUNCTION__, err);
+ err = ccNoError;
+ }
+ }
+
if (!err) {
free ((char *) credentials_iterator->functions);
cci_identifier_release (credentials_iterator->identifier);