commit | 9bb1c049da0e73761e7c0a1387a57e4f3fba8487 | [log] [tgz] |
---|---|---|
author | David Sedlák <xsedla1d@stud.fit.vutbr.cz> | Mon Jul 22 16:45:37 2019 +0200 |
committer | David Sedlák <xsedla1d@stud.fit.vutbr.cz> | Mon Jul 22 16:45:37 2019 +0200 |
tree | 52703e68b39685dd9c9a3bcf1ebcf69bd8d4dbc1 | |
parent | 28794f2933877b46503d12c97f519b330f4beab6 [diff] [blame] |
yin parser BUGFIX memory leak
diff --git a/src/parser_yin.c b/src/parser_yin.c index 36e15e3..e3844c1 100644 --- a/src/parser_yin.c +++ b/src/parser_yin.c
@@ -1650,7 +1650,8 @@ if (subelem->flags & YIN_SUBELEM_VER2) { if (ctx->mod_version < 2) { LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LYVCODE_INSUBELEM2, ly_stmt2str(kw), ly_stmt2str(current_element)); - return LY_EVALID; + ret = LY_EVALID; + goto cleanup; } } subelem->flags |= YIN_SUBELEM_PARSED;