libyang BUGFIX do not overwrite temp log opts
diff --git a/src/xpath.c b/src/xpath.c
index 379e104..139cd0f 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -7799,7 +7799,7 @@
const struct lyxp_set *set, struct ly_path_predicate **predicates)
{
LY_ERR rc = LY_SUCCESS;
- uint32_t e_idx, val_start_idx, pred_idx = 0, temp_lo = 0, pred_len = 0, nested_pred;
+ uint32_t e_idx, val_start_idx, pred_idx = 0, *prev_lo, temp_lo = 0, pred_len = 0, nested_pred;
const struct lysc_node *key;
char *pred = NULL;
struct lyxp_expr *exp2 = NULL;
@@ -7807,7 +7807,7 @@
assert(ctx_scnode->nodetype & (LYS_LIST | LYS_LEAFLIST));
/* turn logging off */
- ly_temp_log_options(&temp_lo);
+ prev_lo = ly_temp_log_options(&temp_lo);
if (ctx_scnode->nodetype == LYS_LIST) {
/* check for predicates "[key1=...][key2=...]..." */
@@ -7942,7 +7942,7 @@
*tok_idx = e_idx;
cleanup:
- ly_temp_log_options(NULL);
+ ly_temp_log_options(prev_lo);
lyxp_expr_free(set->ctx, exp2);
free(pred);
return rc;