Skip to content

Commit

Permalink
Fix for test.c memcb_test and missing XREALLOC.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Jun 28, 2024
1 parent 2a86ca4 commit 2fd7a2e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -53600,8 +53600,8 @@ static void *my_Realloc_cb(void *ptr, size_t size)
WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memcb_test(void)
{
wc_test_ret_t ret = 0;
#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_LINUXKM) && \
!defined(WOLFSSL_STATIC_MEMORY)
#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_NO_REALLOC) && \
!defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_STATIC_MEMORY)
byte* b = NULL;
#endif
wolfSSL_Malloc_cb mc;
Expand All @@ -53614,8 +53614,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memcb_test(void)
if (ret != 0)
return WC_TEST_RET_ENC_EC(ret);

#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_LINUXKM) && \
!defined(WOLFSSL_STATIC_MEMORY)
#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_NO_REALLOC) && \
!defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_STATIC_MEMORY)

/* test realloc */
b = (byte*)XREALLOC(b, 1024, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
Expand Down Expand Up @@ -53650,8 +53650,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memcb_test(void)
ret = WC_TEST_RET_ENC_NC;
#endif /* !WOLFSSL_NO_MALLOC */

#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_LINUXKM) && \
!defined(WOLFSSL_STATIC_MEMORY)
#if !defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_NO_REALLOC) && \
!defined(WOLFSSL_LINUXKM) && !defined(WOLFSSL_STATIC_MEMORY)
exit_memcb:

/* reset malloc/free/realloc counts */
Expand Down

0 comments on commit 2fd7a2e

Please sign in to comment.