pgsql: Avoid potential pfree on NULL on OpenSSL errors

2023-09-22 Thread Daniel Gustafsson
Avoid potential pfree on NULL on OpenSSL errors Guard against the pointer being NULL before pfreeing upon an error returned from OpenSSL. Also handle errors from X509_NAME_print_ex which also can return -1 on memory allocation errors. Backpatch down to v15 where the code was added. Author: Serg

pgsql: Avoid potential pfree on NULL on OpenSSL errors

2023-09-22 Thread Daniel Gustafsson
Avoid potential pfree on NULL on OpenSSL errors Guard against the pointer being NULL before pfreeing upon an error returned from OpenSSL. Also handle errors from X509_NAME_print_ex which also can return -1 on memory allocation errors. Backpatch down to v15 where the code was added. Author: Serg

pgsql: Avoid potential pfree on NULL on OpenSSL errors

2023-09-22 Thread Daniel Gustafsson
Avoid potential pfree on NULL on OpenSSL errors Guard against the pointer being NULL before pfreeing upon an error returned from OpenSSL. Also handle errors from X509_NAME_print_ex which can return -1 on memory allocation errors. Backpatch down to v15 where the code was added. Author: Sergey Sh