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; }