e_policy_conformant: fix bug detected by static analysis tool
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 17 Jul 2017 09:37:54 +0000 (18:37 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 18 Jul 2017 02:25:05 +0000 (11:25 +0900)
Change-Id: I09f3e7b1e9e8abe9f5cae1ed677e4080b2ede67a

src/bin/e_policy_conformant.c

index b4977855f0a3ee10c4ccb612d38320c9a8edddf4..9b24d3fb3f6f7ded3fed78192a8d61c69ffd4fb1 100644 (file)
@@ -297,6 +297,7 @@ _conf_client_defer_job_create(Defer_Job_Type job_type, Conformant_Type conf_type
    Defer_Job *job;
 
    job = E_NEW(Defer_Job, 1);
+   if (!job) return NULL;
 
    job->type = job_type;
    job->conf_type = conf_type;
@@ -785,6 +786,7 @@ _conf_cb_intercept_hook_hide(void *data EINA_UNUSED, E_Client *ec)
                                        type,
                                        pre_serial + 1,
                                        g_conf->part[type].owner);
+   if (!job) return EINA_TRUE;
 
    g_conf->part[type].defer_jobs = eina_list_append(g_conf->part[type].defer_jobs, job);
    g_conf->part[type].state.will_hide = EINA_TRUE;