[gthumb: 2/4] jxl: unref cairo surface to fix memory leak




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

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

 extensions/cairo_io/cairo-image-surface-jxl.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/extensions/cairo_io/cairo-image-surface-jxl.c b/extensions/cairo_io/cairo-image-surface-jxl.c
index 00d75461..361a93d5 100644
--- a/extensions/cairo_io/cairo-image-surface-jxl.c
+++ b/extensions/cairo_io/cairo-image-surface-jxl.c
@@ -292,6 +292,7 @@ _cairo_image_surface_create_from_jxl(GInputStream  *istream,
        cairo_surface_mark_dirty(surface);
        if (cairo_surface_status(surface) == CAIRO_STATUS_SUCCESS)
                gth_image_set_cairo_surface(image, surface);
+       cairo_surface_destroy (surface);
 
        return image;
 }


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