seoz pushed a commit to branch master.

commit c5227c9f724cedc313b1d787a8cb08dc322de258
Author: Daniel Juyung Seo <[email protected]>
Date:   Sat Jul 6 12:14:02 2013 +0900

    elm_config.c: fixed dereference before null check issue which was spotted 
by coverity. CID 1040002.
    
    efd->text_class should be a null.
---
 src/lib/elm_config.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index f158f2d..70f5cf3 100644
--- a/src/lib/elm_config.c
+++ b/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);
 

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to