Fix mem leak
This commit is contained in:
parent
00700bc66d
commit
14f48d0122
2 changed files with 2 additions and 2 deletions
|
|
@ -85,7 +85,7 @@ pn53x_init(struct nfc_device *pnd)
|
|||
}
|
||||
|
||||
if (!CHIP_DATA(pnd)->supported_modulation_as_initiator) {
|
||||
CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation_type) * 9);
|
||||
CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation_type) * (NMT_DEP + 1));
|
||||
if (! CHIP_DATA(pnd)->supported_modulation_as_initiator)
|
||||
return NFC_ESOFT;
|
||||
int nbSupportedModulation = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue