From: Greg Hudson Date: Wed, 4 Feb 2009 19:25:51 +0000 (+0000) Subject: In krb5int_utf8s_to_ucs2les, free the correct value on error, instead X-Git-Tag: krb5-1.8-alpha1~723 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e957ba285d280f9c501964aadc2a9cd5c0b9b3a5;p=krb5.git In krb5int_utf8s_to_ucs2les, free the correct value on error, instead of the caller-supplied result pointer. ticket: 6360 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21881 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/support/utf8_conv.c b/src/util/support/utf8_conv.c index 185dc4ba7..531b3d2d2 100644 --- a/src/util/support/utf8_conv.c +++ b/src/util/support/utf8_conv.c @@ -199,7 +199,7 @@ krb5int_utf8s_to_ucs2les(const char *utf8s, len = k5_utf8s_to_ucs2s((krb5_ucs2 *)*ucs2les, utf8s, chars + 1, 1); if (len < 0) { - free(ucs2les); + free(*ucs2les); *ucs2les = NULL; return EINVAL; }