e_plane: fix bug detected by static analysis tool
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 17 Jul 2017 09:38:38 +0000 (18:38 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 18 Jul 2017 02:25:08 +0000 (11:25 +0900)
Change-Id: Iddc225b2d17c2a34ea1b49bf3d7319468593f306

src/bin/e_plane.c

index f5dd8b7ddef393bdc2f5a028c8d9d41f4f44be42..e9bcd55a21f820069bc6e982649bfebb88979d9f 100644 (file)
@@ -740,6 +740,7 @@ _e_plane_pp_layer_commit(E_Plane *plane, tbm_surface_h tsurface)
      }
 
    data = E_NEW(E_Plane_Commit_Data, 1);
+   if (!data) goto fail;
    data->plane = plane;
    data->renderer = NULL;
    data->tsurface = pp_tsurface;
@@ -1426,6 +1427,7 @@ e_plane_commit_data_aquire(E_Plane *plane)
    if (plane->unset_commit)
      {
         data = E_NEW(E_Plane_Commit_Data, 1);
+        if (!data) return NULL;
         data->plane = plane;
         data->renderer = NULL;
         data->tsurface = NULL;
@@ -1445,6 +1447,7 @@ e_plane_commit_data_aquire(E_Plane *plane)
         if (plane->ec)
           {
              data = E_NEW(E_Plane_Commit_Data, 1);
+             if (!data) return NULL;
              data->plane = plane;
              data->renderer = plane->renderer;
              data->tsurface = plane->tsurface;
@@ -1461,6 +1464,7 @@ e_plane_commit_data_aquire(E_Plane *plane)
              if (plane->is_fb)
                {
                   data = E_NEW(E_Plane_Commit_Data, 1);
+                  if (!data) return NULL;
                   data->plane = plane;
                   data->renderer = plane->renderer;
                   data->tsurface = plane->tsurface;