From a7738508825a415b55ca90dc841376e555e425ee Mon Sep 17 00:00:00 2001 From: V V Date: Mon, 12 Oct 2015 13:50:55 +0300 Subject: [PATCH] updated tgl --- interface.c | 19 ++++++++++--------- main.c | 4 +++- tgl | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/interface.c b/interface.c index a3d1dad..c89de64 100644 --- a/interface.c +++ b/interface.c @@ -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) { logprintf ("Do_clear\n"); free (default_username); - free (config_filename); + tfree_str (config_filename); //free (prefix); - free (auth_file_name); - free (state_file_name); - free (secret_chat_file_name); - free (downloads_directory); - free (config_directory); - free (binlog_file_name); - free (lua_file); - free (python_file); + tfree_str (auth_file_name); + tfree_str (state_file_name); + tfree_str (secret_chat_file_name); + tfree_str (downloads_directory); + //tfree_str (config_directory); + tfree_str (binlog_file_name); + tfree_str (lua_file); + tfree_str (python_file); clear_history (); event_free (term_ev); struct event_base *ev_base = TLS->ev_base; tgl_free_all (TLS); event_base_free (ev_base); + logprintf ("Bytes left allocated: %lld\n", tgl_get_allocated_bytes ()); do_halt (0); } diff --git a/main.c b/main.c index 9d2e2e6..ea634d4 100644 --- a/main.c +++ b/main.c @@ -263,7 +263,7 @@ void running_for_first_time (void) { // printf ("I: config file=[%s]\n", config_filename); int config_file_fd; - char *config_directory = get_config_directory (); + //char *config_directory = get_config_directory (); //char *downloads_directory = get_downloads_directory (); if (!mkdir (config_directory, CONFIG_DIRECTORY_MODE)) { @@ -404,6 +404,8 @@ void parse_config (void) { printf ("[%s] created\n", downloads_directory); } } + tfree_str (config_directory); + config_directory = NULL; config_destroy (&conf); } #else diff --git a/tgl b/tgl index 6467a94..790bde4 160000 --- a/tgl +++ b/tgl @@ -1 +1 @@ -Subproject commit 6467a94ee3d9f69b6f23d66221f7bd0d58df7ac2 +Subproject commit 790bde40a6f5b7db0ee842a3352b29bc7eff8082