pixman: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 5 03:39:57 UTC 2024


 test/a1-trap-test.c   |    7 +++++++
 test/alpha-loop.c     |    2 ++
 test/combiner-test.c  |    4 ++++
 test/infinite-loop.c  |    3 +++
 test/oob-test.c       |    4 ++++
 test/pixel-test.c     |    3 +++
 test/radial-invalid.c |    3 +++
 test/stress-test.c    |    2 ++
 test/trap-crasher.c   |    3 +++
 9 files changed, 31 insertions(+)

New commits:
commit a987256be8147631860a4ff5360207e1dbfc857b
Author: f wasil <f.wasil at samsung.com>
Date:   Tue Nov 5 03:39:54 2024 +0000

    Fixed memory leak in tests

diff --git a/test/a1-trap-test.c b/test/a1-trap-test.c
index c2b4883..6f11049 100644
--- a/test/a1-trap-test.c
+++ b/test/a1-trap-test.c
@@ -54,5 +54,12 @@ main (int argc, char **argv)
     assert (
         strcmp (format_name (PIXMAN_r5g6b5), "r5g6b5") == 0);
     
+
+    free (bits);
+    free (mbits);
+    pixman_image_unref (mask_img);
+    pixman_image_unref (dest_img);
+    pixman_image_unref (src_img);
+
     return 0;
 }
diff --git a/test/alpha-loop.c b/test/alpha-loop.c
index 4d4384d..71822f1 100644
--- a/test/alpha-loop.c
+++ b/test/alpha-loop.c
@@ -29,6 +29,8 @@ main (int argc, char **argv)
 
     pixman_image_composite (PIXMAN_OP_SRC, s, NULL, d, 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
 
+    pixman_image_unref (a);
+    pixman_image_unref (d);
     pixman_image_unref (s);
 
     return 0;
diff --git a/test/combiner-test.c b/test/combiner-test.c
index 01f63a5..e6985cd 100644
--- a/test/combiner-test.c
+++ b/test/combiner-test.c
@@ -147,5 +147,9 @@ main ()
 	}
     }	
 
+    free (src_bytes);
+    free (mask_bytes);
+    free (dest_bytes);
+
     return 0;
 }
diff --git a/test/infinite-loop.c b/test/infinite-loop.c
index 02addaa..1e4ff7d 100644
--- a/test/infinite-loop.c
+++ b/test/infinite-loop.c
@@ -35,5 +35,8 @@ main (int argc, char **argv)
     pixman_image_composite (
 	PIXMAN_OP_OVER, src, NULL, dest, -3, -3, 0, 0, 0, 0, 6, 2);
 
+    pixman_image_unref (src);
+    pixman_image_unref (dest);
+
     return 0;
 }
diff --git a/test/oob-test.c b/test/oob-test.c
index 0d19b50..02cc1de 100644
--- a/test/oob-test.c
+++ b/test/oob-test.c
@@ -85,6 +85,10 @@ test_composite (const composite_info_t *info)
 			    0, 0,
 			    info->dest_x, info->dest_y,
 			    info->width, info->height);
+    free (src->bits.bits);
+    free (dest->bits.bits);
+    pixman_image_unref (src);
+    pixman_image_unref (dest);
 }
 
 
diff --git a/test/pixel-test.c b/test/pixel-test.c
index 7dc0eff..be24113 100644
--- a/test/pixel-test.c
+++ b/test/pixel-test.c
@@ -2974,6 +2974,9 @@ done:
     pixman_image_unref (src);
     pixman_image_unref (dest);
 
+    if (have_mask)
+        pixman_image_unref (mask);
+
     return result;
 }
 
diff --git a/test/radial-invalid.c b/test/radial-invalid.c
index ec85fe3..abf9685 100644
--- a/test/radial-invalid.c
+++ b/test/radial-invalid.c
@@ -50,5 +50,8 @@ main ()
 	0, 0, 0, 0,
 	0, 0, WIDTH, HEIGHT);
 
+    pixman_image_unref (radial);
+    pixman_image_unref (dest);
+
     return 0;
 }
diff --git a/test/stress-test.c b/test/stress-test.c
index 8ee1896..a3cddc7 100644
--- a/test/stress-test.c
+++ b/test/stress-test.c
@@ -422,6 +422,8 @@ create_random_bits_image (alpha_preference_t alpha_preference)
     pixman_image_set_accessors (image, read_func, write_func);
     pixman_image_set_filter (image, filter, coefficients, n_coefficients);
 
+    free (coefficients);
+
     return image;
 }
 
diff --git a/test/trap-crasher.c b/test/trap-crasher.c
index 77be1c9..9ee85fb 100644
--- a/test/trap-crasher.c
+++ b/test/trap-crasher.c
@@ -35,5 +35,8 @@ main()
     dst = pixman_image_create_bits (PIXMAN_a8, 1, 1, NULL, -1);
 
     pixman_add_trapezoids (dst, 0, 0, ARRAY_LENGTH (traps), traps);
+
+    pixman_image_unref (dst);
+
     return (0);
 }


More information about the xorg-commit mailing list