elementary/font - fixed memory leak
authorChunEon Park <hermet@hermet.pe.kr>
Wed, 9 Jan 2013 08:37:48 +0000 (08:37 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Wed, 9 Jan 2013 08:37:48 +0000 (08:37 +0000)
SVN revision: 82440

src/lib/elm_font.c

index 3b037a4..ea88885 100644 (file)
@@ -47,8 +47,12 @@ _elm_font_properties_get(Eina_Hash **font_hash,
         if (!efp)
           {
              efp = calloc(1, sizeof(Elm_Font_Properties));
-             if (!efp) return NULL;
-             
+             if (!efp)
+               {
+                  free(name);
+                  return NULL;
+               }
+
              efp->name = eina_stringshare_add(name);
              if (font_hash)
                {