lib/krb5/kx509.c: fix memory leak in an error case.

This commit is contained in:
Roland C. Dowdeswell
2019-11-26 19:28:57 +00:00
committed by Nico Williams
parent 9265c1ce54
commit 62d13ebf28

View File

@@ -562,9 +562,9 @@ certs_export_func(hx509_context context, void *d, hx509_cert c)
if (ret) if (ret)
return ret; return ret;
ret = decode_Certificate(os.data, os.length, &c2, NULL); ret = decode_Certificate(os.data, os.length, &c2, NULL);
der_free_octet_string(&os);
if (ret) if (ret)
return ret; return ret;
der_free_octet_string(&os);
ret = add_Certificates(cs, &c2); ret = add_Certificates(cs, &c2);
free_Certificate(&c2); free_Certificate(&c2);
return ret; return ret;