mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-12 18:25:07 +08: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);
|
||||
if (!exp_db) {
|
||||
free(msg);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -207,8 +206,10 @@ static struct tlvdb *emv_pki_sign_key(const struct crypto_pk *cp,
|
|||
add_tlv,
|
||||
NULL);
|
||||
free(msg);
|
||||
if (!db)
|
||||
if (!db) {
|
||||
free(exp_db);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
tlvdb_add(db, exp_db);
|
||||
|
||||
|
|
Loading…
Reference in a new issue