libpv: fix memory leak in pv_get_openssl_error

While at it, improve documentation and adapt libpv code.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2022-10-18 14:15:03 +00:00
committed by Jan Höppner
parent 2ee1387f34
commit 73c3a9e684
4 changed files with 23 additions and 13 deletions
+6 -3
View File
@@ -42,11 +42,14 @@ enum PvCryptoMode {
PV_DECRYPT,
};
/** pv_get_openssl_error:
/** pv_get_openssl_errors:
*
* Returns: (transfer full): String representing the error.
* Returns the last OpenSSL error messages.
* Caller is responsible to free the returned value.
*
* Returns: String representing the error.
*/
const char *pv_get_openssl_error(void);
char *pv_get_openssl_errors(void);
/**
* pv_BIO_reset: