Merge pull request #96 from merlokk/p_err

fix possible error
This commit is contained in:
Oleg Moiseenko
2019-02-20 14:50:58 +02:00
committed by GitHub

View File

@@ -352,7 +352,13 @@ struct tlvdb *tlvdb_find_path(struct tlvdb *tlvdb, tlv_tag_t tag[]) {
void tlvdb_add(struct tlvdb *tlvdb, struct tlvdb *other)
{
if (tlvdb == other)
return;
while (tlvdb->next) {
if (tlvdb->next == other)
return;
tlvdb = tlvdb->next;
}