Skip to content

Commit

Permalink
nfc-eventd: check nfc_init() return value
Browse files Browse the repository at this point in the history
git-svn-id: https://nfc-tools.googlecode.com/svn/trunk/nfc-eventd@1127 ba5c3050-9c55-11de-a262-85a698460a8e
  • Loading branch information
doegox committed Apr 7, 2015
1 parent 7c42a2d commit e42686d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nfc-eventd.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ main ( int argc, char *argv[] ) {

//connect:
nfc_init(&context);
if (context == NULL) {
ERR("Unable to init libnfc (malloc)");
exit(EXIT_FAILURE);
}
// Try to open the NFC device
if ( nfc_device == NULL ) nfc_device = nfc_open( context, NULL );
//init:
Expand Down

0 comments on commit e42686d

Please sign in to comment.