The bug caused gnutls_pcert_list_import_x509_raw() to crash if
gnutls_x509_crt_list_import() would fail with the provided data.
Reported by Dmitriy Anisimkov.
flags);
if (ret < 0) {
ret = gnutls_assert_val(ret);
- goto cleanup;
+ goto cleanup_crt;
}
for (i = 0; i < *pcert_max; i++) {
ret = 0;
goto cleanup;
- cleanup_pcert:
+ cleanup_pcert:
for (j = 0; j < i; j++)
gnutls_pcert_deinit(&pcerts[j]);
- cleanup:
+ cleanup:
for (i = 0; i < *pcert_max; i++)
gnutls_x509_crt_deinit(crt[i]);
-
+
+ cleanup_crt:
gnutls_free(crt);
return ret;