From a91ac55e24158465c110ff5e8bb57dfb12286c91 Mon Sep 17 00:00:00 2001 From: Takashi Kojo Date: Sat, 28 Apr 2018 05:05:45 +0900 Subject: [PATCH] define valiable before exec statements --- wolfcrypt/src/asn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 6b62e4b73..6b36c43a4 100755 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -8502,6 +8502,7 @@ static int SetEccPublicKey(byte* output, ecc_key* key, int with_header) byte curve[MAX_ALGO_SZ]; byte pub[ECC_BUFSIZE]; #endif + int ret; #ifdef WOLFSSL_SMALL_STACK pub = (byte*)XMALLOC(ECC_BUFSIZE, key->heap, DYNAMIC_TYPE_TMP_BUFFER); @@ -8509,7 +8510,7 @@ static int SetEccPublicKey(byte* output, ecc_key* key, int with_header) return MEMORY_E; #endif - int ret = wc_ecc_export_x963(key, pub, &pubSz); + ret = wc_ecc_export_x963(key, pub, &pubSz); if (ret != 0) { #ifdef WOLFSSL_SMALL_STACK XFREE(pub, key->heap, DYNAMIC_TYPE_TMP_BUFFER);