taler-mdb

GNU Taler Extensions and Integrations
Log | Files | Refs | Submodules | README | LICENSE

commit e5b14730c3f9c67671044cc2540572fdb7cca88a
parent e505667ff90817556e19fdd6920254b34f555945
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 31 Oct 2019 12:25:13 +0100

clearly no leak, remove unnecessary init, remove unnecessary nfc_close()

Diffstat:
Msrc/nfc.c | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/nfc.c b/src/nfc.c @@ -37,15 +37,12 @@ along with int nfc_transmit (nfc_context *context, const char *talerPayUrl, size_t urlSize) { - nfc_device *pnd = NULL; - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// MEMORY LEAK? NFC OPEN? + nfc_device *pnd; pnd = nfc_open (context, NULL); // NULL could be replaced with connstring if the correct is known if ( ! pnd ) { printf ("Unable to open NFC device\n"); - nfc_close (pnd); return EXIT_FAILURE; } @@ -68,7 +65,6 @@ int nfc_transmit (nfc_context *context, const char *talerPayUrl, size_t urlSize) nfc_close (pnd); return EXIT_FAILURE; } - ; // send the message to the wallet if ( wallet_transmit (pnd, talerPayUrl, urlSize) )