Fix a memory leak
Do not forget to also free data in case of error. Coverity: Resource leak (RESOURCE_LEAK) Calling allocation function "calloc".
This commit is contained in:
parent
ed959004dd
commit
9ca47cded6
|
@ -2044,7 +2044,7 @@ pgp_build_extended_header_list(sc_card_t *card, sc_cardctl_openpgp_keystore_info
|
|||
default:
|
||||
sc_log(ctx, "Unknown key type %d.", key_info->keytype);
|
||||
r = SC_ERROR_INVALID_ARGUMENTS;
|
||||
goto out2;
|
||||
goto out1;
|
||||
}
|
||||
memcpy(data + 2, tlv_7f48, tlvlen_7f48);
|
||||
memcpy(data + 2 + tlvlen_7f48, tlv_5f48, tlvlen_5f48);
|
||||
|
|
Loading…
Reference in New Issue