[gthumb: 3/4] avif: unref cairo surface to fix memory leak




commit 3d985d64492d102027fff41b33be391eb450a6de
Author: Jürg Billeter <j bitron ch>
Date:   Wed Sep 1 11:12:23 2021 +0200

    avif: unref cairo surface to fix memory leak
    
    `gth_image_set_cairo_surface()` takes a reference.

 extensions/cairo_io/cairo-image-surface-avif.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/extensions/cairo_io/cairo-image-surface-avif.c b/extensions/cairo_io/cairo-image-surface-avif.c
index 9dd01f59..c4483d41 100644
--- a/extensions/cairo_io/cairo-image-surface-avif.c
+++ b/extensions/cairo_io/cairo-image-surface-avif.c
@@ -151,6 +151,7 @@ _cairo_image_surface_create_from_avif (GInputStream   *istream,
                *p_original_height = original_height;
 
        gth_image_set_cairo_surface (image, surface);
+       cairo_surface_destroy (surface);
 
 stop_loading:
 


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