From 03bc30f1162de2e547a77d601a8bc9ec0027e1a4 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 5 Mar 2013 23:56:38 +0100 Subject: [PATCH] Fix "Possible null pointer dereference" error --- libnfc/nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 50d6272..6fabdf9 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -172,7 +172,7 @@ void nfc_init(nfc_context **context) { *context = nfc_context_new(); - if (!context) { + if (!*context) { perror("malloc"); return; }