Fixes for building with smallstack

This commit is contained in:
David Garske
2017-05-06 00:39:12 -04:00
parent 011178994b
commit 8cd78edac1
2 changed files with 7 additions and 7 deletions

View File

@ -870,7 +870,7 @@ int LoadCRL(WOLFSSL_CRL* crl, const char* path, int type, int monitor)
ret = SSL_SUCCESS; /* load failures not reported, for backwards compat */ ret = SSL_SUCCESS; /* load failures not reported, for backwards compat */
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(readCtx, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER); XFREE(readCtx, crl->heap, DYNAMIC_TYPE_TMP_BUFFER);
#endif #endif
if (monitor & WOLFSSL_CRL_MONITOR) { if (monitor & WOLFSSL_CRL_MONITOR) {

View File

@ -3017,7 +3017,7 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
WOLFSSL_MSG("Failed to create RecipientInfo"); WOLFSSL_MSG("Failed to create RecipientInfo");
wc_FreeRng(&rng); wc_FreeRng(&rng);
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(recip, NULL, DYNAMMIC_TYPE_TMP_BUFFER); XFREE(recip, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif #endif
return recipSz; return recipSz;
} }
@ -3028,7 +3028,7 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
wc_FreeRng(&rng); wc_FreeRng(&rng);
if (ret != 0) { if (ret != 0) {
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(recip, NULL, DYNAMMIC_TYPE_TMP_BUFFER); XFREE(recip, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif #endif
return ret; return ret;
} }
@ -3037,7 +3037,7 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
contentTypeSz = wc_SetContentType(pkcs7->contentOID, contentType); contentTypeSz = wc_SetContentType(pkcs7->contentOID, contentType);
if (contentTypeSz == 0) { if (contentTypeSz == 0) {
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(recip, NULL, DYNAMMIC_TYPE_TMP_BUFFER); XFREE(recip, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif #endif
return BAD_FUNC_ARG; return BAD_FUNC_ARG;
} }
@ -3066,7 +3066,7 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
if (encryptedContent == NULL) { if (encryptedContent == NULL) {
XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7); XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(recip, NULL, DYNAMMIC_TYPE_TMP_BUFFER); XFREE(recip, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif #endif
return MEMORY_E; return MEMORY_E;
} }
@ -3133,7 +3133,7 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7); XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER); XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_TMP_BUFFER);
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(recip, NULL, DYNAMMIC_TYPE_TMP_BUFFER); XFREE(recip, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif #endif
return BUFFER_E; return BUFFER_E;
} }
@ -3173,7 +3173,7 @@ int wc_PKCS7_EncodeEnvelopedData(PKCS7* pkcs7, byte* output, word32 outputSz)
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7); XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
#ifdef WOLFSSL_SMALL_STACK #ifdef WOLFSSL_SMALL_STACK
XFREE(recip, NULL, DYNAMMIC_TYPE_TMP_BUFFER); XFREE(recip, NULL, DYNAMIC_TYPE_TMP_BUFFER);
#endif #endif
return idx; return idx;