From: Seunghun Lee Date: Wed, 23 Dec 2015 06:58:05 +0000 (+0900) Subject: fix bugs reported by static analyzer. X-Git-Tag: submit/tizen/20151223.114332^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d382d2d77fa79bc49eea19c13befbc8ba1bcd3f0;p=platform%2Fupstream%2Fenlightenment.git fix bugs reported by static analyzer. Change-Id: I0579158edf2eee7b6bd50dcba0ea6e966fca3c3d --- diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 513b64c8cb..0c82dd863d 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -684,6 +684,8 @@ e_comp_wl_input_keymap_set(E_Comp_Data *cdata, const char *rules, const char *mo /* create a new xkb context */ cdata->xkb.context = xkb_context_new(0); + if (!cdata->xkb.context) + return; if (e_config->xkb.use_cache) { diff --git a/src/modules/bufferqueue/e_mod_main.c b/src/modules/bufferqueue/e_mod_main.c index c169a5a8f2..e05085f996 100644 --- a/src/modules/bufferqueue/e_mod_main.c +++ b/src/modules/bufferqueue/e_mod_main.c @@ -191,14 +191,14 @@ _e_bq_mgr_new(char *sock_name) (sock_name != NULL)) { bq_mgr->wdpy = wl_display_create(); - if (bq_mgr->wdpy) + if (!bq_mgr->wdpy) { free(bq_mgr); return NULL; } bq_mgr->loop = wl_display_get_event_loop(bq_mgr->wdpy); - if (bq_mgr->loop) + if (!bq_mgr->loop) { free(bq_mgr); return NULL;