From: Ezra Peisach Date: Thu, 14 Aug 2008 16:22:48 +0000 (+0000) Subject: Clean up memory leak in krb5_build_principal if we run out of memory X-Git-Tag: krb5-1.7-alpha1~493 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=edddcccb6dbad4254d174d2ab456bf3c62ee42af;p=krb5.git Clean up memory leak in krb5_build_principal if we run out of memory while building pricipal. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20656 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/bld_princ.c b/src/lib/krb5/krb/bld_princ.c index c6cb7af05..03bf1267e 100644 --- a/src/lib/krb5/krb/bld_princ.c +++ b/src/lib/krb5/krb/bld_princ.c @@ -106,5 +106,8 @@ krb5_build_principal(krb5_context context, krb5_principal * princ, va_end(ap); if (retval == 0) *princ = pr_ret; + else + krb5_xfree(pr_ret); + return retval; }