summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2008-05-24 13:29:31 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2008-05-24 13:29:31 +0000
commit785fb8e44914777d26dfadaea857770e3c9fe599 (patch)
treeae122f1ff5c30c5852b0bf50394f2deaf4e2a162 /utils
parentf835206e57b76cbc300d8510257f171e4f259ea0 (diff)
fix crash of librfid-tool in scan function (Mate Soos)
git-svn-id: https://svn.gnumonks.org/trunk/librfid@2105 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'utils')
-rw-r--r--utils/librfid-tool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/librfid-tool.c b/utils/librfid-tool.c
index 5f8698c..c8b59ea 100644
--- a/utils/librfid-tool.c
+++ b/utils/librfid-tool.c
@@ -456,6 +456,11 @@ static void do_enum(int layer2)
if (rh->reader->l2_supported & (1 << layer2)) {
l2h = rfid_layer2_init(rh, layer2);
+ if (!l2h) {
+ printf("error during layer2(%s)_init\n",
+ l2_names[layer2]);
+ return;
+ }
printf("Layer2 init ok\n");
rc = rfid_layer2_open(l2h);
} else {
personal git repositories of Harald Welte. Your mileage may vary