commit | 55bce0eeb7e5f105a0323f49a3304722841b64dc | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Tue Feb 15 10:46:08 2022 +0100 |
committer | Michal Vasko <mvasko@cesnet.cz> | Tue Feb 15 10:46:08 2022 +0100 |
tree | 34784af85e61e5ca930bf304f6cc7464c001cc22 | |
parent | b17efe932f73b91267b94a39ba0c4b728ff29c33 [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)) {