1
0
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:
Nikolas Garofil 2010-02-22 13:02:24 +01:00
parent b88d69dbfc
commit e50ec9ded6
3 changed files with 4 additions and 5 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -28,6 +28,8 @@
*
*/
#define free_and_zero(PTR) if(PTR) { free(PTR); PTR = NULL; }
#ifndef _CONKY_CORE_H_
#define _CONKY_CORE_H_