Skip to content

Commit

Permalink
NFC: digital: Free supervisor PDUs
Browse files Browse the repository at this point in the history
This patch frees the RTOX resp sk_buff in initiator mode. It also makes
use of the free_resp exit point for ATN supervisor PDUs in both
initiator and target mode.

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Thierry Escande authored and Samuel Ortiz committed Jul 11, 2016
1 parent e073eb6 commit e200f00
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions net/nfc/digital_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,15 +823,14 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg,
if (rc)
goto error;

return;
goto free_resp;
}

rc = digital_in_send_rtox(ddev, data_exch, resp->data[0]);
if (rc)
goto error;

kfree_skb(resp);
return;
goto free_resp;
}

exit:
Expand Down Expand Up @@ -1225,8 +1224,7 @@ static void digital_tg_recv_dep_req(struct nfc_digital_dev *ddev, void *arg,

ddev->atn_count++;

kfree_skb(resp);
return;
goto free_resp;
}

rc = nfc_tm_data_received(ddev->nfc_dev, resp);
Expand Down

0 comments on commit e200f00

Please sign in to comment.