Call krb5_free_priv_enc_part to free the entire privenc_msg structure
authorTheodore Tso <tytso@mit.edu>
Sat, 29 Apr 1995 04:33:04 +0000 (04:33 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 29 Apr 1995 04:33:04 +0000 (04:33 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5655 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/rd_priv.c

index c8886e1492a5b5be4e27d3509c74e6e351c54ea2..353671d465eebda4eec3a0fbdb0726dcea5264c6 100644 (file)
@@ -1,3 +1,7 @@
+Sat Apr 29 00:09:40 1995  Theodore Y. Ts'o  <tytso@dcl>
+
+       * rd_priv.c (krb5_rd_priv_basic): Call krb5_free_priv_enc_part to free 
+               the entire privenc_msg structure.
 
 Fri Apr 28 09:54:51 EDT 1995   Paul Park       (pjpark@mit.edu)
 
index 71bca16473e53ef1ef60d5243bd6960dcf712ed9..ad221c845009154f692f3efb1f193434f3fcf171 100644 (file)
@@ -155,12 +155,9 @@ krb5_rd_priv_basic(context, inbuf, keyblock, local_addr, remote_addr,
     retval = 0;
 
 cleanup_data:;
-    if (retval) {
-       memset(privmsg_enc_part->user_data.data, 0, 
-              privmsg_enc_part->user_data.length); 
-       krb5_xfree(privmsg_enc_part->user_data.data);
-    }
-    krb5_xfree(privmsg_enc_part);
+    if (retval == 0)
+       privmsg_enc_part->user_data.data = 0;
+    krb5_free_priv_enc_part(context, privmsg_enc_part);
 
 cleanup_scratch:;
     memset(scratch.data, 0, scratch.length);