From 6eefcf40e68c2a5cf35c35b92ed7529072e5da64 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 20 Sep 2011 22:47:12 -0700 Subject: [PATCH] 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 --- profile.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.43.0