[librsvg] rsvg-filter: Use g_new() instead of g_malloc()



commit 655d8b06ed8129ca2673c1406a1358771d2b24c9
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Oct 7 11:47:34 2015 -0500

    rsvg-filter: Use g_new() instead of g_malloc()

 rsvg-filter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 83dcb4f..d80f99f 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -1338,7 +1338,7 @@ box_blur_line (gint box_width, gint even_offset,
                       kernel; it's the pixel to remove from the accumulator. */
     gint  *ac;     /* Accumulator for each channel                           */
 
-    ac = (gint *) g_malloc (sizeof (gint) * bpp);
+    ac = g_new (gint, bpp);
 
     /* The algorithm differs for even and odd-sized kernels.
      * With the output at the center,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]