Fix memory leak.
authorFrantišek Bořánek <fboranek@kerio.com>
Thu, 29 May 2014 12:49:10 +0000 (13:49 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 29 May 2014 13:12:11 +0000 (14:12 +0100)
PR#3278
(cherry picked from commit de56fe797081fc09ebd1add06d6e2df42a324fd5)

crypto/pkcs12/p12_kiss.c

index 5c4c6ec988897d31b74d9651ad87e6bb7b1255ee..bdbbbecf3476e1ad3c97a79b130e89ba86f95511 100644 (file)
@@ -261,7 +261,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
                        int len, r;
                        unsigned char *data;
                        len = ASN1_STRING_to_UTF8(&data, fname);
-                       if(len > 0) {
+                       if(len >= 0) {
                                r = X509_alias_set1(x509, data, len);
                                OPENSSL_free(data);
                                if (!r)