From 2f9bc90a9519f61d64bb900cc238f0570781d0cc Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Mon, 5 Mar 2012 07:28:45 +0000 Subject: [PATCH] Don't return pointer on freed memory on error. PR: http://code.google.com/p/nfc-tools/issues/detail?id=87 Submitted by: jkmalinen@gmail.com --- libnfc/drivers/pn53x_usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libnfc/drivers/pn53x_usb.c b/libnfc/drivers/pn53x_usb.c index a6dd841..ca871a6 100644 --- a/libnfc/drivers/pn53x_usb.c +++ b/libnfc/drivers/pn53x_usb.c @@ -430,6 +430,7 @@ pn53x_usb_open (const nfc_connstring connstring) error: // Free allocated structure on error. nfc_device_free (pnd); + pnd = NULL; free_mem: free (desc.dirname); free (desc.filename);