From: Linus Torvalds Date: Wed, 21 Sep 2011 05:47:12 +0000 (-0700) Subject: Fix 'struct plot_info' memory leak X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=6eefcf40e68c2a5cf35c35b92ed7529072e5da64;p=ext%2Fsubsurface.git Fix 'struct plot_info' memory leak The plot_info was never freed, so every time you'd plot something, we'd leak memory. I'm running valgrind to see if there's anything bad going on. So far it all looks fairly benign. Signed-off-by: Linus Torvalds --- diff --git a/profile.c b/profile.c index 5318393..f2cc526 100644 --- a/profile.c +++ b/profile.c @@ -743,4 +743,5 @@ void plot(struct graphics_context *gc, int w, int h, struct dive *dive) cairo_close_path(gc->cr); cairo_stroke(gc->cr); + free(pi); }