mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 02:55:12 +00:00
Fix memory allocation problem in exec.c
Bug reported by c0nv1ct.
This commit is contained in:
parent
b6331b4eb6
commit
b4feb01818
@ -168,11 +168,10 @@ static inline void read_exec(const char *data, char *buf, const int size)
|
||||
|
||||
static double read_exec_barnum(const char *data)
|
||||
{
|
||||
static char *buf = NULL;
|
||||
char *buf = NULL;
|
||||
double barnum;
|
||||
|
||||
if (!buf)
|
||||
buf = malloc(text_buffer_size);
|
||||
buf = malloc(text_buffer_size);
|
||||
|
||||
read_exec(data, buf, text_buffer_size);
|
||||
barnum = get_barnum(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user