[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

heimdal 0.51 mk_rep mem leak



I don't know if this has been reported before. Found this leak after
slapd/SASL/GSSAPI ate 4GB of RAM during a stress test. It took a while to get
there.

diff -u heimdal-0.5.1.old/lib/krb5/mk_rep.c heimdal-0.5.1/lib/krb5/mk_rep.c
--- heimdal-0.5.1.old/lib/krb5/mk_rep.c 2002-09-04 09:26:05.000000000 -0700
+++ heimdal-0.5.1/lib/krb5/mk_rep.c     2002-12-18 13:54:25.535073000 -0800
@@ -89,8 +89,8 @@
                      len,
                      &ap.enc_part.cipher);
   krb5_crypto_destroy(context, crypto);
+  free(buf);
   if (ret) {
-      free(buf);
       return ret;
   }

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support