X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcore%2Fstore_lookup.c;h=2affaa986f869e3c7514761857653203c291fefa;hb=c22e0cd7a72a36625121b49eb004f50d4204ab92;hp=bb32157402d8c047a20326aab81e069a4073e5f1;hpb=69892731c1a337485c955f5c292d8cf7c179a162;p=sysdb.git diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index bb32157..2affaa9 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -681,7 +681,14 @@ sdb_store_matcher_parse_cmp(const char *obj_type, const char *attr, /* 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 */