Commit a7738508 authored by V V's avatar V V

updated tgl

parent 865c0a93
...@@ -1567,21 +1567,22 @@ extern struct event *term_ev; ...@@ -1567,21 +1567,22 @@ extern struct event *term_ev;
void do_clear (struct command *command, int arg_num, struct arg args[], struct in_ev *ev) { void do_clear (struct command *command, int arg_num, struct arg args[], struct in_ev *ev) {
logprintf ("Do_clear\n"); logprintf ("Do_clear\n");
free (default_username); free (default_username);
free (config_filename); tfree_str (config_filename);
//free (prefix); //free (prefix);
free (auth_file_name); tfree_str (auth_file_name);
free (state_file_name); tfree_str (state_file_name);
free (secret_chat_file_name); tfree_str (secret_chat_file_name);
free (downloads_directory); tfree_str (downloads_directory);
free (config_directory); //tfree_str (config_directory);
free (binlog_file_name); tfree_str (binlog_file_name);
free (lua_file); tfree_str (lua_file);
free (python_file); tfree_str (python_file);
clear_history (); clear_history ();
event_free (term_ev); event_free (term_ev);
struct event_base *ev_base = TLS->ev_base; struct event_base *ev_base = TLS->ev_base;
tgl_free_all (TLS); tgl_free_all (TLS);
event_base_free (ev_base); event_base_free (ev_base);
logprintf ("Bytes left allocated: %lld\n", tgl_get_allocated_bytes ());
do_halt (0); do_halt (0);
} }
......
...@@ -263,7 +263,7 @@ void running_for_first_time (void) { ...@@ -263,7 +263,7 @@ void running_for_first_time (void) {
// printf ("I: config file=[%s]\n", config_filename); // printf ("I: config file=[%s]\n", config_filename);
int config_file_fd; int config_file_fd;
char *config_directory = get_config_directory (); //char *config_directory = get_config_directory ();
//char *downloads_directory = get_downloads_directory (); //char *downloads_directory = get_downloads_directory ();
if (!mkdir (config_directory, CONFIG_DIRECTORY_MODE)) { if (!mkdir (config_directory, CONFIG_DIRECTORY_MODE)) {
...@@ -404,6 +404,8 @@ void parse_config (void) { ...@@ -404,6 +404,8 @@ void parse_config (void) {
printf ("[%s] created\n", downloads_directory); printf ("[%s] created\n", downloads_directory);
} }
} }
tfree_str (config_directory);
config_directory = NULL;
config_destroy (&conf); config_destroy (&conf);
} }
#else #else
......
Subproject commit 6467a94ee3d9f69b6f23d66221f7bd0d58df7ac2 Subproject commit 790bde40a6f5b7db0ee842a3352b29bc7eff8082
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment