pull up r21881 from trunk
authorTom Yu <tlyu@mit.edu>
Wed, 18 Feb 2009 18:17:40 +0000 (18:17 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 18 Feb 2009 18:17:40 +0000 (18:17 +0000)
 ------------------------------------------------------------------------
 r21881 | ghudson | 2009-02-04 14:25:51 -0500 (Wed, 04 Feb 2009) | 7 lines
 Changed paths:
    M /trunk/src/util/support/utf8_conv.c

 ticket: 6360
 tags: pullup
 target_version: 1.7

 In krb5int_utf8s_to_ucs2les, free the correct value on error, instead
 of the caller-supplied result pointer.

 ------------------------------------------------------------------------

ticket: 6360
status: resolved
version_fixed: 1.7

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@22014 dc483132-0cff-0310-8789-dd5450dbe970

src/util/support/utf8_conv.c

index 185dc4ba77b9384c1af5dca049795ce18062c5dd..531b3d2d20f2eaa683742d5573869b9985671766 100644 (file)
@@ -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;
     }