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

fix segfault

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1062 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2008-03-29 04:41:37 +00:00
parent de53544017
commit cb653c0baa

View File

@ -3822,10 +3822,10 @@ static struct text_object_list *extract_variable_text_internal(const char *const
{ {
struct text_object_list *retval; struct text_object_list *retval;
struct text_object *obj; struct text_object *obj;
char *p, *s; char *p, *s, *orig_p;
p = strdup(const_p); p = strdup(const_p);
s = p; s = orig_p = p;
retval = malloc(sizeof(struct text_object_list)); retval = malloc(sizeof(struct text_object_list));
memset(retval, 0, sizeof(struct text_object_list)); memset(retval, 0, sizeof(struct text_object_list));
@ -3969,7 +3969,7 @@ static struct text_object_list *extract_variable_text_internal(const char *const
ERR("one or more $endif's are missing"); ERR("one or more $endif's are missing");
} }
free(p); free(orig_p);
return retval; return retval;
} }