Fix memory leak
This commit is contained in:
parent
81e2129dd5
commit
cdb7bdd148
2 changed files with 3 additions and 6 deletions
|
@ -28,13 +28,11 @@ print_config()
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
config_t runtime_config;
|
||||
void
|
||||
parse_config_file(FILE *config)
|
||||
{
|
||||
|
||||
config_t runtime_config;
|
||||
|
||||
config_init(&runtime_config);
|
||||
config_read(&runtime_config, config);
|
||||
config_setting_t *cur;
|
||||
|
|
|
@ -22,10 +22,10 @@ bool ipv6_flag = false, ipv4_flag = false, http_proxy_flag = false,
|
|||
|
||||
char *http_proxy_url, *socks_proxy_url;
|
||||
char *ssh_key_path = NULL;
|
||||
config_t runtime_config;
|
||||
|
||||
char *server = "https://lainsafe.delegao.moe";
|
||||
const char *path = ".cache/sakisafelinks";
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
@ -256,9 +256,8 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
curl_easy_cleanup(easy_handle);
|
||||
|
||||
free(buffer);
|
||||
config_destroy(&runtime_config);
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue