path UPDTAE deref func support in leafref (#2030)

diff --git a/src/xpath.c b/src/xpath.c
index b676dd9..0f1eaae 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -6662,7 +6662,7 @@
 {
     ly_bool temp_ctx = 0;
     uint32_t getnext_opts, orig_used, i, mod_idx, idx;
-    const struct lys_module *mod;
+    const struct lys_module *mod = NULL;
     const struct lysc_node *iter;
     enum lyxp_node_type iter_type;