(get_AuthorityKeyIdentifier): leak less memory
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20400 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1017,11 +1017,13 @@ get_AuthorityKeyIdentifier(hx509_context context,
|
||||
if (ret == 0) {
|
||||
ai->keyIdentifier = calloc(1, sizeof(*ai->keyIdentifier));
|
||||
if (ai->keyIdentifier == NULL) {
|
||||
free_SubjectKeyIdentifier(&si);
|
||||
ret = ENOMEM;
|
||||
hx509_set_error_string(context, 0, ret, "Out of memory");
|
||||
goto out;
|
||||
}
|
||||
ret = der_copy_octet_string(&si, ai->keyIdentifier);
|
||||
free_SubjectKeyIdentifier(&si);
|
||||
if (ret) {
|
||||
hx509_set_error_string(context, 0, ret, "Out of memory");
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user