From 7e26869b684e922d197091142a812dee80ced4cf Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Thu, 21 Feb 2013 19:58:40 +0100 Subject: [PATCH] Fixes nfc_drivers memory leak --- libnfc/nfc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 6bc84dd..aec0d5e 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -185,6 +185,12 @@ nfc_init(nfc_context **context) void nfc_exit(nfc_context *context) { + while (nfc_drivers) { + struct nfc_driver_list *pndl = nfc_drivers; + nfc_drivers = pndl->next; + free (pndl); + } + nfc_context_free(context); }