yin parser BUGFIX memleak
diff --git a/src/parser_yin.c b/src/parser_yin.c
index 03241ef..aa27547 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -526,6 +526,8 @@
LOGVAL_PARSER(xml_ctx, LY_VCODE_INCHILDSTMT_YIN, name_len, name, 9, "extension");
return LY_EVALID;
}
+ LY_ARRAY_FREE(subelem_args);
+ subelem_args = NULL;
}
return ret;
diff --git a/tests/src/test_parser_yin.c b/tests/src/test_parser_yin.c
index 2cd2d88..98188cb 100644
--- a/tests/src/test_parser_yin.c
+++ b/tests/src/test_parser_yin.c
@@ -527,9 +527,11 @@
assert_string_equal(iter->ref, "ref");
assert_true(iter->flags & LYS_STATUS_DEPRC);
}
-
-
+ lydict_remove(st->ctx, "b");
+ lydict_remove(st->ctx, "desc");
+ lydict_remove(st->ctx, "ref");
LY_ARRAY_FREE(args);
+ LY_ARRAY_FREE(exts);
st->finished_correctly = true;
}