diff options
author | Ezra Peisach <epeisach@mit.edu> | 2001-10-30 16:29:40 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2001-10-30 16:29:40 +0000 |
commit | d2f0635b70699b5a68f9746d69c4109cd717e30a (patch) | |
tree | 0d24530fc33c5739c136cf0d1b63360fd333fb15 /src/lib/kdb | |
parent | b86ad7c075ffe4e560f7988a0cce47f6f1296604 (diff) | |
download | krb5-d2f0635b70699b5a68f9746d69c4109cd717e30a.tar.gz krb5-d2f0635b70699b5a68f9746d69c4109cd717e30a.tar.xz krb5-d2f0635b70699b5a68f9746d69c4109cd717e30a.zip |
* kdb_cpw.c (cleanup_key_data): Do not free NULL pointer
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13906 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/kdb')
-rw-r--r-- | src/lib/kdb/ChangeLog | 4 | ||||
-rw-r--r-- | src/lib/kdb/kdb_cpw.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 41eeaf85f1..ecdc7d8b80 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,7 @@ +2001-10-30 Ezra Peisach <epeisach@mit.edu> + + * kdb_cpw.c (cleanup_key_data): Do not free NULL pointer. + 2001-10-26 Ezra Peisach <epeisach@mit.edu> * kdb_xdr.c (krb5_encode_princ_contents): Use krb5_ui_2 instead of diff --git a/src/lib/kdb/kdb_cpw.c b/src/lib/kdb/kdb_cpw.c index 4acf3112a0..962a2b540a 100644 --- a/src/lib/kdb/kdb_cpw.c +++ b/src/lib/kdb/kdb_cpw.c @@ -80,6 +80,9 @@ cleanup_key_data(context, count, data) { int i, j; + /* If data is NULL, count is always 0 */ + if (data == NULL) return; + for (i = 0; i < count; i++) { for (j = 0; j < data[i].key_data_ver; j++) { if (data[i].key_data_length[j]) { |