mifare: Correct memory leaks
authorDorota Moskal <dorota.moskal@tieto.com>
Thu, 27 Sep 2012 11:22:24 +0000 (13:22 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 9 Oct 2012 21:32:02 +0000 (23:32 +0200)
commitc08f21e89008955b35cc1097b1e579b0c9a4fea1
tree67b80a9b08c14d31f1bedca5ee69446b6e71eb1c
parentecf79a87e2efbb867f824c8cd3bed7a0dbe33a9f
mifare: Correct memory leaks

There were some memory leaks:
* in some reading and writing callback functions,
  in case sending command failed (e.g. after
  failed authorisation), cookie wasn't released,
* after checking presence global cookie wasn't released,
* while processing MADs before writing, new data was
          allocated (although there was no need for this) and so
          the old one was lost.
plugins/mifare.c