Freeing allocated memory before exiting.
This commit is contained in:
parent
8cf83567c9
commit
2c85cc2019
@ -175,6 +175,12 @@ void load_disk() {
|
|||||||
printf("\nOr with sudo:\n");
|
printf("\nOr with sudo:\n");
|
||||||
printf("echo 3 | sudo tee /proc/sys/vm/drop_caches\n");
|
printf("echo 3 | sudo tee /proc/sys/vm/drop_caches\n");
|
||||||
printf("********************************************************************************\n");
|
printf("********************************************************************************\n");
|
||||||
|
|
||||||
|
/* Free allocated memory */
|
||||||
|
i = 0;
|
||||||
|
while (root_dir_entries[i++] != NULL)
|
||||||
|
free(root_dir_entries[i]);
|
||||||
|
free(root_dir_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user