Fix memory leak.

PR#3278
(cherry picked from commit de56fe797081fc09ebd1add06d6e2df42a324fd5)
This commit is contained in:
František Bořánek 2014-05-29 13:49:10 +01:00 committed by Dr. Stephen Henson
parent bf8d6f9ab8
commit f8dc000699

View file

@ -269,7 +269,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)