offscreen-memleak.patch 1006 B

123456789101112131415161718192021222324252627282930
  1. From 941513b280433c269491572b7b1de2a7c5bab21b Mon Sep 17 00:00:00 2001
  2. From: Aaron Plattner <aplattner@nvidia.com>
  3. Date: Fri, 18 Mar 2016 16:00:05 -0700
  4. Subject: st: Fix offscreen leak if cogl_framebuffer_allocate fails
  5. If cogl_framebuffer_allocate fails in _st_create_shadow_pipeline_from_actor, the
  6. CoglOffscreen* that was allocated earlier in the function is leaked.
  7. https://bugzilla.gnome.org/show_bug.cgi?id=735705
  8. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
  9. ---
  10. src/st/st-private.c | 1 +
  11. 1 file changed, 1 insertion(+)
  12. diff --git a/src/st/st-private.c b/src/st/st-private.c
  13. index 559336c..d40eceb 100644
  14. --- a/src/st/st-private.c
  15. +++ b/src/st/st-private.c
  16. @@ -442,6 +442,7 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec,
  17. if (!cogl_framebuffer_allocate (fb, &catch_error))
  18. {
  19. cogl_error_free (catch_error);
  20. + cogl_object_unref (offscreen);
  21. cogl_object_unref (buffer);
  22. return NULL;
  23. }
  24. --
  25. cgit v0.12