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:
Love Hörnquist Åstrand
2006-10-21 19:50:31 +00:00
parent 5407ae308c
commit 0ae86fa160

View File

@@ -66,12 +66,12 @@ hx509_set_error_stringv(hx509_context context, int flags, int code,
msg = calloc(1, sizeof(*msg));
if (msg == NULL) {
free_error_string(context->error);
context->error = NULL;
hx509_clear_error_string(context);
return;
}
if (vasprintf(&msg->msg, fmt, ap) == -1) {
hx509_clear_error_string(context);
free(msg);
return;
}