free strings after use
This commit is contained in:
parent
c013f078ab
commit
cca7224559
1 changed files with 3 additions and 0 deletions
|
@ -218,12 +218,14 @@ int main(int argc, char *argv[]) {
|
||||||
fprintf(stderr, "error: failed formatting config dir (this shouldn't happen)");
|
fprintf(stderr, "error: failed formatting config dir (this shouldn't happen)");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
free(home);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asprintf(&config_path, "%s/modfetch.conf", config_dir) < 0) {
|
if (asprintf(&config_path, "%s/modfetch.conf", config_dir) < 0) {
|
||||||
fprintf(stderr, "error: failed formatting config path (this shouldn't happen)");
|
fprintf(stderr, "error: failed formatting config path (this shouldn't happen)");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
free(config_dir);
|
||||||
|
|
||||||
for (size_t i = 1; i < (size_t)argc; ++i) {
|
for (size_t i = 1; i < (size_t)argc; ++i) {
|
||||||
if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--config") == 0) {
|
if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--config") == 0) {
|
||||||
|
@ -257,6 +259,7 @@ int main(int argc, char *argv[]) {
|
||||||
Config config = parse_config(config_file);
|
Config config = parse_config(config_file);
|
||||||
|
|
||||||
fclose(config_file);
|
fclose(config_file);
|
||||||
|
free(config_path);
|
||||||
|
|
||||||
for (size_t i = 0; i < config.module_count; ++i) {
|
for (size_t i = 0; i < config.module_count; ++i) {
|
||||||
Module current_module = config.modules[i];
|
Module current_module = config.modules[i];
|
||||||
|
|
Loading…
Reference in a new issue