After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 649504 - region-utils.c: Squash a memory leak
region-utils.c: Squash a memory leak
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-05 20:14 UTC by Colin Walters
Modified: 2011-05-11 18:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
region-utils.c: Squash a memory leak (2.18 KB, patch)
2011-05-05 20:14 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2011-05-05 20:14:53 UTC
"chunk" was an allocated but unused variable.

==13810== 56 bytes in 2 blocks are definitely lost in loss record 13,212 of 18,765
==13810==    at 0x4006D69: malloc (vg_replace_malloc.c:236)
==13810==    by 0x4FC2F91: cairo_region_create (cairo-region.c:196)
==13810==    by 0x40E581C: meta_make_border_region (region-utils.c:279)
==13810==    by 0x40DEACB: meta_shadow_factory_get_shadow (meta-shadow-factory.c:692)
==13810==    by 0x40E3687: meta_window_actor_pre_paint (meta-window-actor.c:1963)
==13810==    by 0x40D9449: meta_repaint_func (compositor.c:1090)
==13810==    by 0x47C6437: _clutter_run_repaint_functions (clutter-main.c:3192)
==13810==    by 0x47C6E8C: clutter_clock_dispatch (clutter-master-clock.c:367)
==13810==    by 0x518B29E: g_main_context_dispatch (gmain.c:2447)
==13810==    by 0x518BA0F: g_main_context_iterate (gmain.c:3098)
==13810==    by 0x518C156: g_main_loop_run (gmain.c:3306)
==13810==    by 0x40FC8BF: meta_run (main.c:557)
Comment 1 Colin Walters 2011-05-05 20:14:55 UTC
Created attachment 187319 [details] [review]
region-utils.c: Squash a memory leak
Comment 2 Owen Taylor 2011-05-06 18:02:14 UTC
Review of attachment 187319 [details] [review]:

Don't like the commit message - the valgrind trace is just clutter - belongs in the bug report possibly, but how you tracked down a bug has nothing to do with the change you made to fix it so shouldn't be in the commit log. Other than that and see below, find to commit.

::: src/compositor/region-utils.c
@@ +276,1 @@
       if (iter.rectangle.x > last_x)

You left a stray blank line above this
Comment 3 Colin Walters 2011-05-11 18:15:04 UTC
Attachment 187319 [details] pushed as 6596374 - region-utils.c: Squash a memory leak