commit | b670ff5afb176565e0eeeea99b57712d8a4a9c6a | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Feb 15 10:46:08 2022 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Mar 15 11:36:42 2022 +0100 |
tree | 34784af85e61e5ca930bf304f6cc7464c001cc22 | |
parent | f073753f0f5ae8f9447024b88f1d9e5bd49323fc [diff] [blame] |
json & schema_compile BUGFIX uninitialized variables Fixes #1787
diff --git a/src/schema_compile.c b/src/schema_compile.c index aeeb239..760c052 100644 --- a/src/schema_compile.c +++ b/src/schema_compile.c
@@ -151,6 +151,13 @@ { LY_ARRAY_COUNT_TYPE u; + if (instance_p) { + *instance_p = NULL; + } + if (cardinality_p) { + *cardinality_p = 0; + } + LY_ARRAY_FOR(ext->substmts, u) { if (LY_STMT_IS_DATA_NODE(substmt)) { if (!LY_STMT_IS_DATA_NODE(ext->substmts[u].stmt)) {