From e1a20e83d50d9f2e84c238094c57c69d0116b63f Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sat, 27 Aug 2005 06:02:45 +0000 Subject: [PATCH] oops..mem leak! git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@202 7f574dfc-610e-0410-a909-a81674777703 --- src/conky.c | 3 ++- src/linux.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conky.c b/src/conky.c index 9ed7c868..5e81ba6c 100644 --- a/src/conky.c +++ b/src/conky.c @@ -2820,6 +2820,7 @@ static inline int get_string_width_special(char *s) if (strlen(final) > 1) { width += calc_text_width(final, strlen(final)); } + free(final); return width; #else return strlen(s); @@ -3300,7 +3301,7 @@ static void draw_line(char *s) break; case GRAPH: - { + { if (cur_x > maximum_width - text_start_x && maximum_width > 0) { break; } diff --git a/src/linux.c b/src/linux.c index 125a0e7c..10198c4a 100644 --- a/src/linux.c +++ b/src/linux.c @@ -1125,6 +1125,7 @@ void update_diskio() * cd-roms and floppies, and summ them up */ current = 0; + strcmp(buf, "fasdf"); while (!feof(fp)) { fgets(buf, 512, fp); col_count = sscanf(buf, "%u %u %*s %*u %*u %u %*u %*u %*u %u",