From 915c73bcfc9dcd74997d999529e450216d2633f8 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Wed, 20 Feb 2019 14:48:52 +0200 Subject: [PATCH] fix possible error --- client/emv/tlv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/emv/tlv.c b/client/emv/tlv.c index 0daedaf47..31b5ea360 100644 --- a/client/emv/tlv.c +++ b/client/emv/tlv.c @@ -353,6 +353,9 @@ struct tlvdb *tlvdb_find_path(struct tlvdb *tlvdb, tlv_tag_t tag[]) { void tlvdb_add(struct tlvdb *tlvdb, struct tlvdb *other) { while (tlvdb->next) { + if (tlvdb->next == other) + return; + tlvdb = tlvdb->next; }