1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 11:05:18 +00:00

Fix memory allocation problem in exec.c

Bug reported by c0nv1ct.
This commit is contained in:
Pavel Labath 2009-12-10 23:09:56 +01:00
parent b6331b4eb6
commit b4feb01818

View File

@ -168,10 +168,9 @@ static inline void read_exec(const char *data, char *buf, const int size)
static double read_exec_barnum(const char *data) static double read_exec_barnum(const char *data)
{ {
static char *buf = NULL; char *buf = NULL;
double barnum; double barnum;
if (!buf)
buf = malloc(text_buffer_size); buf = malloc(text_buffer_size);
read_exec(data, buf, text_buffer_size); read_exec(data, buf, text_buffer_size);