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);