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
This commit is contained in:
Romain Tartiere 2012-03-05 07:28:45 +00:00
parent 68a1d5c450
commit 2f9bc90a95

View file

@ -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);