summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/ccache/stdio
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1994-09-23 01:39:18 +0000
committerTheodore Tso <tytso@mit.edu>1994-09-23 01:39:18 +0000
commit955414824eb55c653811f522bcfe47fa8dd67d31 (patch)
tree3142daeace3ad41fb3e026dddb53dd0d2836dfb4 /src/lib/krb5/ccache/stdio
parent6729afae0b2c3d18853c0ff3d585c5f61d678a2c (diff)
downloadkrb5-955414824eb55c653811f522bcfe47fa8dd67d31.tar.gz
krb5-955414824eb55c653811f522bcfe47fa8dd67d31.tar.xz
krb5-955414824eb55c653811f522bcfe47fa8dd67d31.zip
Make sure memory associated the credentials cache is freed after the
cache is destroyed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4334 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/ccache/stdio')
-rw-r--r--src/lib/krb5/ccache/stdio/ChangeLog5
-rw-r--r--src/lib/krb5/ccache/stdio/scc_destry.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/krb5/ccache/stdio/ChangeLog b/src/lib/krb5/ccache/stdio/ChangeLog
index 56d6d4fb3b..b7976942b2 100644
--- a/src/lib/krb5/ccache/stdio/ChangeLog
+++ b/src/lib/krb5/ccache/stdio/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep 22 21:38:09 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * scc_destry.c (krb5_scc_destroy): Make sure memory associated
+ with the credentials cache is freed after it is destroyed.
+
Thu Aug 18 16:34:51 1994 Theodore Y. Ts'o (tytso at tsx-11)
* scc_retrv.c (srvname_match): Fix bug in srvname_match where so
diff --git a/src/lib/krb5/ccache/stdio/scc_destry.c b/src/lib/krb5/ccache/stdio/scc_destry.c
index 1691692ddf..4555c6f4b8 100644
--- a/src/lib/krb5/ccache/stdio/scc_destry.c
+++ b/src/lib/krb5/ccache/stdio/scc_destry.c
@@ -61,7 +61,7 @@ krb5_error_code krb5_scc_destroy(id)
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
#if 0
@@ -77,7 +77,7 @@ krb5_error_code krb5_scc_destroy(id)
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
/* XXX This may not be legal XXX */
@@ -91,7 +91,7 @@ krb5_error_code krb5_scc_destroy(id)
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
if (fwrite(data->file, zeros, size % BUFSIZ) < 0) {
@@ -100,7 +100,7 @@ krb5_error_code krb5_scc_destroy(id)
(void) fclose(data->file);
data->file = 0;
}
- return ret;
+ goto cleanup;
}
ret = fclose(data->file);
@@ -110,5 +110,10 @@ krb5_error_code krb5_scc_destroy(id)
if (ret)
ret = krb5_scc_interpret(errno);
+ cleanup:
+ xfree(data->filename);
+ xfree(data);
+ xfree(id);
+
return ret;
}