Added variable initialization for g_variant_get 52/231552/1
authorINSUN PYO <insun.pyo@samsung.com>
Wed, 22 Apr 2020 09:33:18 +0000 (18:33 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Wed, 22 Apr 2020 09:33:18 +0000 (18:33 +0900)
Change-Id: Ica9c29a3ca755a83590ed9af1e8abddedf0cf14a

src/heart/heart-abnormal.c
src/proc-stat/proc-monitor.c

index ba7ae6b..02554a6 100644 (file)
@@ -206,7 +206,7 @@ static void heart_abnormal_process_crashed(GVariant *params)
        gpointer key, value;
        time_t curtime, starttime;
        GHashTableIter hiter;
-       char *process_name, *exepath, *appid, *pkgid;
+       char *process_name = NULL, *exepath = NULL, *appid = NULL, *pkgid = NULL;
        char info[ABNORMAL_DATA_MAX];
        struct heart_abnormal_table *table = NULL;
 
index dfdbe57..5570c5f 100644 (file)
@@ -293,7 +293,7 @@ failure:
 
 EXPORT_TEST void dbus_get_app_memory(GDBusMethodInvocation *invocation, GVariant *params)
 {
-       char *appid;
+       char *appid = NULL;
        unsigned int usage = 0;
        struct proc_app_info *pai = NULL;