mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-14 11:33:14 +00:00
Fix $combine reading unallocated memory
This commit is contained in:
parent
b88d69dbfc
commit
e50ec9ded6
@ -181,7 +181,6 @@ void free_combine(struct text_object *obj)
|
||||
free(cd->seperation);
|
||||
free(cd->right);
|
||||
free_text_objects(obj->sub);
|
||||
free(obj->sub);
|
||||
free(obj->data.opaque);
|
||||
obj->data.opaque = NULL;
|
||||
free_and_zero(obj->sub);
|
||||
free_and_zero(obj->data.opaque);
|
||||
}
|
||||
|
@ -682,8 +682,6 @@ void conftree_empty(struct conftree* tree) {
|
||||
|
||||
struct conftree *currentconffile;
|
||||
|
||||
#define free_and_zero(PTR) if(PTR) { free(PTR); PTR = NULL; }
|
||||
|
||||
static void extract_variable_text(const char *p)
|
||||
{
|
||||
free_text_objects(&global_root_object);
|
||||
|
@ -28,6 +28,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define free_and_zero(PTR) if(PTR) { free(PTR); PTR = NULL; }
|
||||
|
||||
#ifndef _CONKY_CORE_H_
|
||||
#define _CONKY_CORE_H_
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user