fix plm P130430-0630
authorJiyoun Park <jy0703.park@samsung.com>
Tue, 7 May 2013 09:43:08 +0000 (18:43 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Tue, 11 Jun 2013 10:25:11 +0000 (19:25 +0900)
fix memory leak related with profile

Change-Id: I99a883bf71fecedee51a66b663b237d73a4c4ffa

src/lib/ecore_evas/ecore_evas_x.c
src/lib/ecore_x/xlib/ecore_x_e.c

index 546dafe..0668ef1 100644 (file)
@@ -737,7 +737,7 @@ _ecore_evas_x_event_property_change(void *data __UNUSED__, int type __UNUSED__,
           }
         else if ((p) && (!ee->prop.profile))
           {
-             ee->prop.profile = strdup(p);
+             ee->prop.profile = eina_stringshare_add(p);
              state_change = 1;
           }
 
index b4f87c8..00e6a8a 100644 (file)
@@ -1694,6 +1694,8 @@ ecore_x_e_window_profile_get(Ecore_X_Window win)
    if (atom)
      profile = ecore_x_atom_name_get(atom[0]);
 
+   if (data) free(data);
+
    return profile;
 }