Fix bug in __get_caller_unique_name 40/133140/1
authorJiwoong Im <jiwoong.im@samsung.com>
Thu, 8 Jun 2017 04:40:58 +0000 (13:40 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Fri, 9 Jun 2017 05:11:18 +0000 (05:11 +0000)
- 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>
(cherry picked from commit 110a542df2a44a30e4296ed13e3e0def1f3dd3c2)

alarm-manager.c

index 2950689..8ca2710 100644 (file)
@@ -2139,7 +2139,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);