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:
Ludovic Rousseau 2012-08-24 00:14:00 +02:00 committed by Viktor Tarasov
parent ed959004dd
commit 9ca47cded6
1 changed files with 1 additions and 1 deletions

View File

@ -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);