Code

store_lookup: Don't accept invalid object types in parse_cmp().
[sysdb.git] / src / core / store_lookup.c
index 100942ac8ab652fc21c9d2691e9517ca28564c81..dceab19dd7d99feb1e7fb68982d43fe703567e00 100644 (file)
@@ -683,6 +683,8 @@ sdb_store_matcher_parse_cmp(const char *obj_type, const char *attr,
                type = SDB_SERVICE;
        else if (! strcasecmp(obj_type, "attribute"))
                type = SDB_ATTRIBUTE;
+       else
+               return NULL;
 
        /* TODO: support other operators */
        if (! strcasecmp(op, "=")) {