GNOME Bugzilla – Bug 308953
possible leaks of cairo contexts
Last modified: 2005-06-28 09:45:35 UTC
These are from a cursory manual inspection as I wasn't sure how to excercise these parts of the code off hand.
Created attachment 48289 [details] [review] possible patch
gdkpango.c changes are wrong - the context is freed later. gtkvruler.c change looks right, but see also the pango layout that is being leaked and same code in gtkhruler.c. (A goto to a label at the end of the function would be clearer than duplicating the cleanup code) The rest of the stuff isn't related to cairo contexts ... was it meant to be in this bug report?
I forgot I had some unrelated changes locally. I'll file a separate report for those. Will take a stab at updating according to your comments.
Created attachment 48400 [details] [review] proposed patch Does this look ok? I wasn't sure if the out: label should be before or after the cairo_fill() call, but I guess after will give the same effect as now only without leaking stuff.
Looks correct to me, please commit.
Commited.
Just to mention in case it wasn't a typo: goto statements should be indented normally, not "outdented" to the left margin. 2005-06-27 Owen Taylor <otaylor@redhat.com> * gtk/gtk[hv]ruler.c (gtk_[hv]ruler_draw_ticks): Fix indentation.
thanks for catching that, just a small braino...