Skip to content

Commit

Permalink
Fix function logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Fekete committed May 10, 2024
1 parent 8f9c8a1 commit f73a9f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -15745,7 +15745,7 @@ int wolfSSL_PEM_read_bio(WOLFSSL_BIO* bio, char **name, char **header,
* @param [in] header Encryption header.
* @param [in] data DER data.
* @param [in] len Length of DER data.
* @return 0 on success.
* @return 0 on failure.
* @return MEMORY_E when dynamic memory allocation fails.
*/
int wolfSSL_PEM_write_bio(WOLFSSL_BIO* bio, const char *name,
Expand All @@ -15770,6 +15770,7 @@ int wolfSSL_PEM_write_bio(WOLFSSL_BIO* bio, const char *name,
/* Write PEM into BIO. */
if ((!err) && (wolfSSL_BIO_write(bio, pem, pemLen) != (int)pemLen)) {
pemLen = 0;
err = 1;
}

XFREE(pem, NULL, DYNAMIC_TYPE_TMP_BUFFER);
Expand Down

0 comments on commit f73a9f0

Please sign in to comment.