From f3e250df559a6e4677072bbe2936a8a093798bbd Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Mon, 16 Nov 2009 08:39:05 +0100 Subject: [PATCH] Bugfix: make sure $else works correct and without memleaks --- src/conky.c | 2 +- src/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conky.c b/src/conky.c index e9dcb05..6f20bd5 100644 --- a/src/conky.c +++ b/src/conky.c @@ -1167,7 +1167,7 @@ void generate_text_internal(char *p, int p_max_size, * Do Ninja jump here: without leaving traces. * This is to prevent us from stale jumped flags. */ - obj = obj->sub; + obj = obj->special_data; continue; } OBJ(endif) { diff --git a/src/core.c b/src/core.c index 77d7e5b..9dc3ed5 100644 --- a/src/core.c +++ b/src/core.c @@ -1781,7 +1781,7 @@ void free_text_objects(struct text_object *root, int internal) #ifdef XMMS2 if(obj->type == OBJ_if_xmms2_connected) type_is_if = 1; #endif - if(obj->special_data && type_is_if == 0) free(obj->special_data); + if(obj->special_data && obj->type != OBJ_else && type_is_if == 0) free(obj->special_data); free(obj); } #undef data -- 1.7.9.5