projects
/
platform
/
core
/
system
/
resourced.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebe3868
)
Avoid iterating over a NULL hash
sandbox/lstelmach/null-hash
author
Łukasz Stelmach
<l.stelmach@samsung.com>
Tue, 18 Sep 2018 14:37:46 +0000
(16:37 +0200)
committer
Łukasz Stelmach
<l.stelmach@samsung.com>
Tue, 18 Sep 2018 14:37:54 +0000
(16:37 +0200)
Change-Id: I7f783bf192bb27e9d3748208d8f9a551420dc298
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
src/heart/logging.c
patch
|
blob
|
history
diff --git
a/src/heart/logging.c
b/src/heart/logging.c
index bf9134ca84bb77c1428157c1a30dd82b210ffaf2..0fc03ebc63e5317ed45e033d72d4463abded5574 100644
(file)
--- a/
src/heart/logging.c
+++ b/
src/heart/logging.c
@@
-437,6
+437,11
@@
int logging_module_init(char *name, enum logging_period max_period,
}
snprintf(buf, LOGGING_BUF_MAX, CREATE_QUERY, name);
+ if (module->db_list == NULL) {
+ _E("db_list is NULL, name(%s), db_type(%d)", name, db_type);
+ ret = RESOURCED_ERROR_FAIL;
+ goto error;
+ }
g_hash_table_iter_init(&iter, module->db_list);
while (g_hash_table_iter_next(&iter, &key, &value)) {
/* create table using module name and field_forms */