Avoid useing freed memory.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21140 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-06-18 21:24:19 +00:00
parent 000a661cad
commit 7c5b097a53

View File

@@ -100,12 +100,13 @@ hx509_certs_init(hx509_context context,
}
ops = _hx509_ks_type(context, type);
free(type);
if (ops == NULL) {
hx509_set_error_string(context, 0, ENOENT,
"Keyset type %s is not supported", type);
free(type);
return ENOENT;
}
free(type);
c = calloc(1, sizeof(*c));
if (c == NULL) {
hx509_clear_error_string(context);