Clean error string on failure just to make sure.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18781 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -66,12 +66,12 @@ hx509_set_error_stringv(hx509_context context, int flags, int code,
|
|||||||
|
|
||||||
msg = calloc(1, sizeof(*msg));
|
msg = calloc(1, sizeof(*msg));
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
free_error_string(context->error);
|
hx509_clear_error_string(context);
|
||||||
context->error = NULL;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vasprintf(&msg->msg, fmt, ap) == -1) {
|
if (vasprintf(&msg->msg, fmt, ap) == -1) {
|
||||||
|
hx509_clear_error_string(context);
|
||||||
free(msg);
|
free(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user