Fix "Possible null pointer dereference" error
This commit is contained in:
parent
e55efd6db0
commit
03bc30f116
@ -172,7 +172,7 @@ void
|
||||
nfc_init(nfc_context **context)
|
||||
{
|
||||
*context = nfc_context_new();
|
||||
if (!context) {
|
||||
if (!*context) {
|
||||
perror("malloc");
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user