index bb32157402d8c047a20326aab81e069a4073e5f1..2affaa986f869e3c7514761857653203c291fefa 100644 (file)
--- a/src/core/store_lookup.c
+++ b/src/core/store_lookup.c
/* service = */ NULL,
sdb_store_attr_matcher(matcher, matcher_re, NULL, NULL));
- if (m && inv) {
+ if (! m)
+ return NULL;
+
+ /* pass ownership to the host matcher */
+ sdb_object_deref(SDB_OBJ(HOST_M(m)->service));
+ sdb_object_deref(SDB_OBJ(HOST_M(m)->attr));
+
+ if (inv) {
sdb_store_matcher_t *tmp;
tmp = sdb_store_inv_matcher(m);
/* pass ownership to the inverse matcher */