mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-19 08:16:35 +00:00
Fix bug introduced in some signal traps where context was not declared
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
#include "nfc-utils.h"
|
||||
|
||||
static nfc_device *pnd;
|
||||
static nfc_context *context;
|
||||
static bool quiet_output = false;
|
||||
// Version of the emulated type4 tag:
|
||||
static int type4v = 2;
|
||||
@@ -380,7 +381,6 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
nfc_context *context;
|
||||
nfc_init(&context);
|
||||
if (context == NULL) {
|
||||
ERR("Unable to init libnfc (malloc)\n");
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#endif
|
||||
|
||||
static nfc_device *pnd;
|
||||
static nfc_context *context;
|
||||
|
||||
static void
|
||||
print_usage(char *progname)
|
||||
@@ -198,7 +199,6 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
nfc_context *context;
|
||||
nfc_init(&context);
|
||||
if (context == NULL) {
|
||||
ERR("Unable to init libnfc (malloc)\n");
|
||||
|
||||
Reference in New Issue
Block a user