hash table BUGFIX init out params
diff --git a/src/hash_table.c b/src/hash_table.c
index 88531a9..8b83194 100644
--- a/src/hash_table.c
+++ b/src/hash_table.c
@@ -285,6 +285,10 @@
 {
     struct ly_ht_rec *rec;
 
+    if (match_p) {
+        *match_p = NULL;
+    }
+
     lyht_find_rec(ht, val_p, hash, 0, ht->val_equal, NULL, &rec);
 
     if (rec && match_p) {