commit | 1391e7997198ded9ec300603a13e6a9c268afeec | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Mon Aug 23 12:15:44 2021 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Mon Aug 23 12:15:44 2021 +0200 |
tree | 11190034e2992be046da7ed09a6af8eafc247407 | |
parent | e8e37ae07cab89846dfb34e21fa358d76f6057be [diff] |
lyb parser BUGFIX freeing context on error
diff --git a/src/parser_lyb.c b/src/parser_lyb.c index 78496fc..53e9c1e 100644 --- a/src/parser_lyb.c +++ b/src/parser_lyb.c
@@ -737,7 +737,9 @@ ly_log_options(prev_lo); ly_in_free(in, 0); - lydctx->free(lydctx); + if (lydctx) { + lydctx->free(lydctx); + } if (ret) { lyd_free_siblings(*tree); *tree = NULL;