summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/err/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/err/err.c')
-rw-r--r--src/lib/libcrypto/err/err.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/libcrypto/err/err.c b/src/lib/libcrypto/err/err.c
index fcdb244008..69713a6e2f 100644
--- a/src/lib/libcrypto/err/err.c
+++ b/src/lib/libcrypto/err/err.c
@@ -1066,13 +1066,6 @@ void ERR_set_error_data(char *data, int flags)
1066void ERR_add_error_data(int num, ...) 1066void ERR_add_error_data(int num, ...)
1067 { 1067 {
1068 va_list args; 1068 va_list args;
1069 va_start(args, num);
1070 ERR_add_error_vdata(num, args);
1071 va_end(args);
1072 }
1073
1074void ERR_add_error_vdata(int num, va_list args)
1075 {
1076 int i,n,s; 1069 int i,n,s;
1077 char *str,*p,*a; 1070 char *str,*p,*a;
1078 1071
@@ -1081,6 +1074,7 @@ void ERR_add_error_vdata(int num, va_list args)
1081 if (str == NULL) return; 1074 if (str == NULL) return;
1082 str[0]='\0'; 1075 str[0]='\0';
1083 1076
1077 va_start(args, num);
1084 n=0; 1078 n=0;
1085 for (i=0; i<num; i++) 1079 for (i=0; i<num; i++)
1086 { 1080 {
@@ -1096,7 +1090,7 @@ void ERR_add_error_vdata(int num, va_list args)
1096 if (p == NULL) 1090 if (p == NULL)
1097 { 1091 {
1098 OPENSSL_free(str); 1092 OPENSSL_free(str);
1099 return; 1093 goto err;
1100 } 1094 }
1101 else 1095 else
1102 str=p; 1096 str=p;
@@ -1105,6 +1099,9 @@ void ERR_add_error_vdata(int num, va_list args)
1105 } 1099 }
1106 } 1100 }
1107 ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING); 1101 ERR_set_error_data(str,ERR_TXT_MALLOCED|ERR_TXT_STRING);
1102
1103err:
1104 va_end(args);
1108 } 1105 }
1109 1106
1110int ERR_set_mark(void) 1107int ERR_set_mark(void)