summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bf21a79)
raw | patch | inline | side by side (parent: bf21a79)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 11 Mar 2015 19:02:07 +0000 (20:02 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 11 Mar 2015 19:02:07 +0000 (20:02 +0100) |
src/core/store_expr.c | patch | blob | history |
diff --git a/src/core/store_expr.c b/src/core/store_expr.c
index 8fc063d11e64ca621fd2206ad9a46b242d36cc48..60b0bea130a8c50f85c12b6c1b6d9cf91ebc6a25 100644 (file)
--- a/src/core/store_expr.c
+++ b/src/core/store_expr.c
sdb_avltree_iter_t *tree = NULL;
sdb_data_t array = SDB_DATA_INIT;
- if ((! expr) || (! obj))
+ if (! expr)
return NULL;
if (expr->type == TYPED_EXPR) {
+ if (! obj)
+ return NULL;
if (obj->type == SDB_HOST) {
if (expr->data.data.integer == SDB_SERVICE)
tree = sdb_avltree_get_iter(HOST(obj)->services);
}
}
else if (expr->type == FIELD_VALUE) {
+ if (! obj)
+ return NULL;
if (expr->data.data.integer == SDB_FIELD_BACKEND) {
/* while scanning the store, we hold a read lock, so it's safe to
* access the data without copying */