commit | a04107f8bd9c9db5cf8f22ea05ba806eaa1ecc33 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Mar 29 12:09:50 2022 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Mar 29 12:09:50 2022 +0200 |
tree | 80f4a7789e13ef50c2ba9d2294e235bba3a6c9f0 | |
parent | 10cd71c39352ed28d731cc9a7e8e2d92ecd9ce9f [diff] |
parser xml BUGFIX memory leak
diff --git a/src/parser_xml.c b/src/parser_xml.c index fc7f3d8..3ce2611 100644 --- a/src/parser_xml.c +++ b/src/parser_xml.c
@@ -723,7 +723,7 @@ LY_CHECK_ERR_GOTO(!val, LOGMEM(xmlctx->ctx); ret = LY_EMEM, error); /* parser next */ - LY_CHECK_GOTO(ret = lyxml_ctx_next(xmlctx), error); + LY_CHECK_ERR_GOTO(ret = lyxml_ctx_next(xmlctx), free(val), error); /* create node */ ret = lyd_create_any(snode, val, LYD_ANYDATA_STRING, 1, &node);