needs to be freed.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7009
dc483132-0cff-0310-8789-
dd5450dbe970
+Tue Oct 31 22:06:52 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * finish_key.c (mit_des_finish_key): Make mit_des_finish_key()
+ safe to call even if there is no key that needs to be
+ freed.
+
Fri Oct 6 21:59:55 1995 Theodore Y. Ts'o <tytso@dcl>
* Makefile.in: Remove ##DOS!include of config/windows.in.
mit_des_finish_key (eblock)
krb5_encrypt_block FAR * eblock;
{
- memset((char *)eblock->priv, 0, (size_t) eblock->priv_size);
- free(eblock->priv);
+ if (eblock->priv) {
+ memset((char *)eblock->priv, 0, (size_t) eblock->priv_size);
+ free(eblock->priv);
+ }
eblock->priv = 0;
eblock->priv_size = 0;
/* free/clear other stuff here? */