From b88d69dbfc4f6d0ce28f01c8d26c14b356918d70 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Sun, 21 Feb 2010 20:15:08 +0100 Subject: [PATCH] Implement fix from previous commit in another way to fix a leak that happens when conky closes --- src/conky.cc | 1 + src/core.cc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conky.cc b/src/conky.cc index 4c53ab37..bfdd71df 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -2419,6 +2419,7 @@ void clean_up(void *memtofree1, void* memtofree2) free_desktop_info(); #endif /* BUILD_X11 */ + free_text_objects(&global_root_object); free_and_zero(tmpstring1); free_and_zero(tmpstring2); free_and_zero(text_buffer); diff --git a/src/core.cc b/src/core.cc index 671c7164..55948581 100644 --- a/src/core.cc +++ b/src/core.cc @@ -1863,7 +1863,6 @@ void free_text_objects(struct text_object *root) } if(obj->sub) { free_text_objects(obj->sub); - free(obj->sub); } if(obj->special_data) free(obj->special_data);