rotation: fix possibly allocate the memory as a zero size. 17/69517/1 accepted/tizen/ivi/20160516.001918 accepted/tizen/mobile/20160516.001805 accepted/tizen/tv/20160516.001830 accepted/tizen/wearable/20160516.001851 submit/tizen/20160513.131144 submit/tizen/20160515.231814
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 13 May 2016 13:23:34 +0000 (22:23 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Fri, 13 May 2016 13:23:34 +0000 (22:23 +0900)
Change-Id: I046ebb5a86c519f299f38ec2938b5198646262ca

src/rotation/e_mod_rotation_wl.c

index f27363c..e2ff650 100644 (file)
@@ -1288,7 +1288,9 @@ _rot_hook_eval_fetch(void *d EINA_UNUSED, E_Client *ec)
         if (rot->available_angles & TIZEN_ROTATION_ANGLE_180) count++;
         if (rot->available_angles & TIZEN_ROTATION_ANGLE_270) count++;
 
-        rots = (int*)E_NEW(int, count);
+        if (count != 0)
+          rots = (int*)E_NEW(int, count);
+
         if (!rots)
           {
              /* restore previous rotation hints */