Fix bug in __get_caller_unique_name 68/132868/3
authorJiwoong Im <jiwoong.im@samsung.com>
Thu, 8 Jun 2017 04:40:58 +0000 (13:40 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Thu, 8 Jun 2017 07:39:53 +0000 (16:39 +0900)
- There is a bug that assign a wrong value to is_app boolean value.

Change-Id: I617d385849399d729d55c16ae6f927b3bc4f23b4
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
alarm-manager.c

index 694271b..1114c17 100644 (file)
@@ -2208,7 +2208,7 @@ bool __get_caller_unique_name(int pid, char *unique_name, bool *is_app, uid_t ui
        appid_cache_t* entry = (appid_cache_t*)calloc(1, sizeof(appid_cache_t));
 
        entry->unique_name = strdup(unique_name);
-       entry->is_app = is_app;
+       entry->is_app = is_app ? *is_app : false;
        entry->pid = pid;
        g_hash_table_foreach_remove(appid_cache_table, __hash_table_remove_cb, (gpointer)unique_name);
        g_hash_table_insert(appid_cache_table, &entry->pid, (gpointer)entry);