(keychain_init): free ctx on error
This commit is contained in:
@@ -344,11 +344,13 @@ keychain_init(hx509_context context,
|
|||||||
if (ret != noErr) {
|
if (ret != noErr) {
|
||||||
hx509_set_error_string(context, 0, ENOENT,
|
hx509_set_error_string(context, 0, ENOENT,
|
||||||
"Failed to open %s", residue);
|
"Failed to open %s", residue);
|
||||||
|
free(ctx);
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hx509_set_error_string(context, 0, ENOENT,
|
hx509_set_error_string(context, 0, ENOENT,
|
||||||
"Unknown subtype %s", residue);
|
"Unknown subtype %s", residue);
|
||||||
|
free(ctx);
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user