Fix memleak reported by klockwork:
authorChris Michael <cp.michael@samsung.com>
Fri, 28 Jun 2013 12:39:45 +0000 (13:39 +0100)
committerChris Michael <cp.michael@samsung.com>
Fri, 28 Jun 2013 12:39:45 +0000 (13:39 +0100)
If a jpeg image is rotated and we have allocated space for ptr_rotate,
then we should free it Always ... Not Only if the degrees are
180...because we allocate it always

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/loaders/jpeg/evas_image_load_jpeg.c

index c3e3a40..96de9c6 100644 (file)
@@ -1083,11 +1083,11 @@ done:
                        to += hw;
                     }
                }
-             if (ptr_rotate)
-               {
-                  free(ptr_rotate);
-                  ptr_rotate = NULL;
-               }
+          }
+        if (ptr_rotate)
+          {
+             free(ptr_rotate);
+             ptr_rotate = NULL;
           }
         if (region)
           {