(keychain_init): free ctx on error

This commit is contained in:
Love Hörnquist Åstrand
2015-04-18 17:08:09 -07:00
parent 9c4d304fb2
commit a26007cebc

View File

@@ -344,11 +344,13 @@ keychain_init(hx509_context context,
if (ret != noErr) {
hx509_set_error_string(context, 0, ENOENT,
"Failed to open %s", residue);
free(ctx);
return ENOENT;
}
} else {
hx509_set_error_string(context, 0, ENOENT,
"Unknown subtype %s", residue);
free(ctx);
return ENOENT;
}
}