summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-05-02 14:11:12 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-05-02 14:11:12 +0200
commitea56b2aa3318299963c6b40e303daac306b154de (patch)
tree214d47e6c4e99bc20fc99c802182f75aa9cf6010 /src/tests
parentc3c9fed7d9660a983ebd306eb2193640aa558fe3 (diff)
eina_test_tiler: Fix resource leak
Summary: Coverity reports that reassigning 't' here leaks the storage that t points to, so free the previous eina_tiler before reassigning the variable. Fixes CID1401068 @fix Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8762
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/eina/eina_test_tiler.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/tests/eina/eina_test_tiler.c b/src/tests/eina/eina_test_tiler.c
index 46d1b024a7..e2f1adb86e 100644
--- a/src/tests/eina/eina_test_tiler.c
+++ b/src/tests/eina/eina_test_tiler.c
@@ -245,12 +245,8 @@ EFL_START_TEST(eina_test_tiler_calculation)
245 t2 = eina_tiler_new(500, 500); 245 t2 = eina_tiler_new(500, 500);
246 fail_if(!t2); 246 fail_if(!t2);
247 247
248 t = eina_tiler_new(500, 500);
249 fail_if(!t);
250
251 eina_tiler_tile_size_set(t1, 1, 1); 248 eina_tiler_tile_size_set(t1, 1, 1);
252 eina_tiler_tile_size_set(t2, 1, 1); 249 eina_tiler_tile_size_set(t2, 1, 1);
253 eina_tiler_tile_size_set(t, 1, 1);
254 250
255 EINA_RECTANGLE_SET(&r1, 0, 0, 500, 500); 251 EINA_RECTANGLE_SET(&r1, 0, 0, 500, 500);
256 eina_tiler_rect_add(t1, &r1); 252 eina_tiler_rect_add(t1, &r1);