diff options
Diffstat (limited to 'src/lib/libcrypto/err/err.c')
| -rw-r--r-- | src/lib/libcrypto/err/err.c | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c index f6f9d2c080..93ed1da943 100644 --- a/src/lib/libcrypto/err/err.c +++ b/src/lib/libcrypto/err/err.c | |||
| @@ -572,7 +572,7 @@ static ERR_STRING_DATA SYS_str_reasons[NUM_SYS_STR_REASONS + 1]; | |||
| 572 | 572 | ||
| 573 | static void build_SYS_str_reasons(void) | 573 | static void build_SYS_str_reasons(void) | 
| 574 | { | 574 | { | 
| 575 | /* OPENSSL_malloc cannot be used here, use static storage instead */ | 575 | /* malloc cannot be used here, use static storage instead */ | 
| 576 | static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON]; | 576 | static char strerror_tab[NUM_SYS_STR_REASONS][LEN_SYS_STR_REASON]; | 
| 577 | int i; | 577 | int i; | 
| 578 | static int init = 1; | 578 | static int init = 1; | 
| @@ -625,7 +625,7 @@ static void build_SYS_str_reasons(void) | |||
| 625 | if (((p)->err_data[i] != NULL) && \ | 625 | if (((p)->err_data[i] != NULL) && \ | 
| 626 | (p)->err_data_flags[i] & ERR_TXT_MALLOCED) \ | 626 | (p)->err_data_flags[i] & ERR_TXT_MALLOCED) \ | 
| 627 | { \ | 627 | { \ | 
| 628 | OPENSSL_free((p)->err_data[i]); \ | 628 | free((p)->err_data[i]); \ | 
| 629 | (p)->err_data[i]=NULL; \ | 629 | (p)->err_data[i]=NULL; \ | 
| 630 | } \ | 630 | } \ | 
| 631 | (p)->err_data_flags[i]=0; \ | 631 | (p)->err_data_flags[i]=0; \ | 
| @@ -651,7 +651,7 @@ static void ERR_STATE_free(ERR_STATE *s) | |||
| 651 | { | 651 | { | 
| 652 | err_clear_data(s,i); | 652 | err_clear_data(s,i); | 
| 653 | } | 653 | } | 
| 654 | OPENSSL_free(s); | 654 | free(s); | 
| 655 | } | 655 | } | 
| 656 | 656 | ||
| 657 | void ERR_load_ERR_strings(void) | 657 | void ERR_load_ERR_strings(void) | 
| @@ -1015,7 +1015,7 @@ ERR_STATE *ERR_get_state(void) | |||
| 1015 | /* ret == the error state, if NULL, make a new one */ | 1015 | /* ret == the error state, if NULL, make a new one */ | 
| 1016 | if (ret == NULL) | 1016 | if (ret == NULL) | 
| 1017 | { | 1017 | { | 
| 1018 | ret=(ERR_STATE *)OPENSSL_malloc(sizeof(ERR_STATE)); | 1018 | ret=(ERR_STATE *)malloc(sizeof(ERR_STATE)); | 
| 1019 | if (ret == NULL) return(&fallback); | 1019 | if (ret == NULL) return(&fallback); | 
| 1020 | CRYPTO_THREADID_cpy(&ret->tid, &tid); | 1020 | CRYPTO_THREADID_cpy(&ret->tid, &tid); | 
| 1021 | ret->top=0; | 1021 | ret->top=0; | 
| @@ -1076,7 +1076,7 @@ void ERR_add_error_vdata(int num, va_list args) | |||
| 1076 | char *str,*p,*a; | 1076 | char *str,*p,*a; | 
| 1077 | 1077 | ||
| 1078 | s=80; | 1078 | s=80; | 
| 1079 | str=OPENSSL_malloc(s+1); | 1079 | str=malloc(s+1); | 
| 1080 | if (str == NULL) return; | 1080 | if (str == NULL) return; | 
| 1081 | str[0]='\0'; | 1081 | str[0]='\0'; | 
| 1082 | 1082 | ||
| @@ -1091,10 +1091,10 @@ void ERR_add_error_vdata(int num, va_list args) | |||
| 1091 | if (n > s) | 1091 | if (n > s) | 
| 1092 | { | 1092 | { | 
| 1093 | s=n+20; | 1093 | s=n+20; | 
| 1094 | p=OPENSSL_realloc(str,s+1); | 1094 | p=realloc(str,s+1); | 
| 1095 | if (p == NULL) | 1095 | if (p == NULL) | 
| 1096 | { | 1096 | { | 
| 1097 | OPENSSL_free(str); | 1097 | free(str); | 
| 1098 | return; | 1098 | return; | 
| 1099 | } | 1099 | } | 
| 1100 | else | 1100 | else | 
