free memory

This commit is contained in:
Tectu 2012-06-26 16:22:08 +02:00
parent 4fee89285e
commit 9693778666

4
gui.c
View File

@ -35,7 +35,7 @@ static void deleteNode(char *name) {
if(firstGUI != NULL) {
if(strcmp(firstGUI->name, name) == 0) {
pointer = firstGUI->next;
free(firstGUI);
chHeapFree(firstGUI);
firstGUI = pointer;
} else {
pointer = firstGUI;
@ -45,7 +45,7 @@ static void deleteNode(char *name) {
if(strcmp(firstGUI->name, name) == 0) {
pointer->next = pointer1->next;
free(pointer1);
chHeapFree(pointer1);
break;
}