From 107b4ece8b870250470ed83dd58d624e2ccf884e Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Thu, 19 Sep 2013 20:38:56 +0200 Subject: [PATCH] Fix use after free bug nfc_exit(context); was called 2 times CID 1090348 (#1 of 1): Use after free (USE_AFTER_FREE)53. deref_arg: Calling "nfc_exit(nfc_context *)" dereferences freed pointer "context". (The dereference is assumed on the basis of the 'nonnull' parameter attribute.) --- utils/nfc-relay-picc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/nfc-relay-picc.c b/utils/nfc-relay-picc.c index 5817556..7543db9 100644 --- a/utils/nfc-relay-picc.c +++ b/utils/nfc-relay-picc.c @@ -486,7 +486,6 @@ main(int argc, char *argv[]) } if (!initiator_only_mode) { nfc_close(pndTarget); - nfc_exit(context); } nfc_exit(context); exit(EXIT_FAILURE);