From: Ezra Peisach Date: Tue, 30 Oct 2001 16:29:40 +0000 (+0000) Subject: * kdb_cpw.c (cleanup_key_data): Do not free NULL pointer X-Git-Tag: krb5-1.3-alpha1~985 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d2f0635b70699b5a68f9746d69c4109cd717e30a;p=krb5.git * 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 --- diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 41eeaf85f..ecdc7d8b8 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,7 @@ +2001-10-30 Ezra Peisach + + * kdb_cpw.c (cleanup_key_data): Do not free NULL pointer. + 2001-10-26 Ezra Peisach * 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 4acf3112a..962a2b540 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]) {