From 372e3da7d958c616054f2edacc98c5b3cbecb7eb Mon Sep 17 00:00:00 2001 From: Barry Jaspan Date: Fri, 2 Aug 1996 18:04:39 +0000 Subject: [PATCH] * f_keyblock.c (krb5_free_keyblock_contents): added krb5_free_keyblock_contents git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8897 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/free/ChangeLog | 5 +++++ src/lib/krb5/free/f_keyblock.c | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/lib/krb5/free/ChangeLog b/src/lib/krb5/free/ChangeLog index e8632bd92..6ad05dcbe 100644 --- a/src/lib/krb5/free/ChangeLog +++ b/src/lib/krb5/free/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 2 14:03:44 1996 Barry Jaspan + + * f_keyblock.c (krb5_free_keyblock_contents): added + krb5_free_keyblock_contents + Wed Nov 8 17:51:51 1995 Theodore Y. Ts'o * f_einfo.c (krb5_free_etype_info): Added new function to free a diff --git a/src/lib/krb5/free/f_keyblock.c b/src/lib/krb5/free/f_keyblock.c index 605165719..f3e13cfef 100644 --- a/src/lib/krb5/free/f_keyblock.c +++ b/src/lib/krb5/free/f_keyblock.c @@ -26,15 +26,26 @@ #include "k5-int.h" +void +krb5_free_keyblock_contents(context, key) + krb5_context context; + register krb5_keyblock *key; +{ + if (key->contents) { + memset(key->contents, 0, key->length); + krb5_xfree(key->contents); + } + return; +} + void krb5_free_keyblock(context, val) krb5_context context; register krb5_keyblock *val; { - if (val->contents) { - memset((char *)val->contents, 0, val->length); - krb5_xfree(val->contents); - } + krb5_free_keyblock_contents(context, val); krb5_xfree(val); return; } + + -- 2.26.2