From df0383a45a89990cfe7bd7ccd48683afa6f5bcf9 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Sat, 6 Jul 2013 12:14:02 +0900 Subject: [PATCH] elm_config.c: fixed dereference before null check issue which was spotted by coverity. CID 1040002. efd->text_class should be a null. --- legacy/elementary/src/lib/elm_config.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/legacy/elementary/src/lib/elm_config.c b/legacy/elementary/src/lib/elm_config.c index f158f2d24f..70f5cf303e 100644 --- a/legacy/elementary/src/lib/elm_config.c +++ b/legacy/elementary/src/lib/elm_config.c @@ -653,14 +653,15 @@ _elm_config_font_overlay_remove(const char *text_class) EINA_LIST_FOREACH(_elm_config->font_overlays, l, efd) { - if (strcmp(efd->text_class, text_class)) - continue; + if (!efd->text_class) continue; + if (strcmp(efd->text_class, text_class)) continue; + _font_overlays_del = eina_list_append(_font_overlays_del, eina_stringshare_add(text_class)); _elm_config->font_overlays = eina_list_remove_list(_elm_config->font_overlays, l); - if (efd->text_class) eina_stringshare_del(efd->text_class); + eina_stringshare_del(efd->text_class); if (efd->font) eina_stringshare_del(efd->font); free(efd);