free memory
This commit is contained in:
parent
4fee89285e
commit
9693778666
1 changed files with 2 additions and 2 deletions
4
gui.c
4
gui.c
|
@ -35,7 +35,7 @@ static void deleteNode(char *name) {
|
||||||
if(firstGUI != NULL) {
|
if(firstGUI != NULL) {
|
||||||
if(strcmp(firstGUI->name, name) == 0) {
|
if(strcmp(firstGUI->name, name) == 0) {
|
||||||
pointer = firstGUI->next;
|
pointer = firstGUI->next;
|
||||||
free(firstGUI);
|
chHeapFree(firstGUI);
|
||||||
firstGUI = pointer;
|
firstGUI = pointer;
|
||||||
} else {
|
} else {
|
||||||
pointer = firstGUI;
|
pointer = firstGUI;
|
||||||
|
@ -45,7 +45,7 @@ static void deleteNode(char *name) {
|
||||||
|
|
||||||
if(strcmp(firstGUI->name, name) == 0) {
|
if(strcmp(firstGUI->name, name) == 0) {
|
||||||
pointer->next = pointer1->next;
|
pointer->next = pointer1->next;
|
||||||
free(pointer1);
|
chHeapFree(pointer1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue