Fix a potential memory leak
If tlvblock is not stored then the value is lost and the allocated mempry is leaked. Coverity: Resource leak (RESOURCE_LEAK) Calling allocation function "pgp_build_tlv" on "tlvblock".
This commit is contained in:
parent
b90a557237
commit
ed959004dd
|
@ -2057,6 +2057,8 @@ pgp_build_extended_header_list(sc_card_t *card, sc_cardctl_openpgp_keystore_info
|
|||
if (result != NULL) {
|
||||
*result = tlvblock;
|
||||
*resultlen = tlvlen;
|
||||
} else {
|
||||
free(tlvblock);
|
||||
}
|
||||
|
||||
out1:
|
||||
|
|
Loading…
Reference in New Issue