mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
coverity 226370 - fix resource leak
This commit is contained in:
parent
98d641dba5
commit
6d3adf71b6
1 changed files with 3 additions and 2 deletions
|
@ -196,7 +196,6 @@ static struct tlvdb *emv_pki_sign_key(const struct crypto_pk *cp,
|
||||||
struct tlvdb *exp_db = tlvdb_fixed(exp_tag, ipk->elen, ipk->exp);
|
struct tlvdb *exp_db = tlvdb_fixed(exp_tag, ipk->elen, ipk->exp);
|
||||||
if (!exp_db) {
|
if (!exp_db) {
|
||||||
free(msg);
|
free(msg);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,8 +206,10 @@ static struct tlvdb *emv_pki_sign_key(const struct crypto_pk *cp,
|
||||||
add_tlv,
|
add_tlv,
|
||||||
NULL);
|
NULL);
|
||||||
free(msg);
|
free(msg);
|
||||||
if (!db)
|
if (!db) {
|
||||||
|
free(exp_db);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
tlvdb_add(db, exp_db);
|
tlvdb_add(db, exp_db);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue