]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Fix 'struct plot_info' memory leak
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 21 Sep 2011 05:47:12 +0000 (22:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 21 Sep 2011 05:47:12 +0000 (22:47 -0700)
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 <torvalds@linux-foundation.org>
profile.c

index 531839368bf4cd53b89c386ef84a5c15c5b02078..f2cc526dd7ff4f15e33d2f85be1d080d6452cd8d 100644 (file)
--- 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);
 }