Fix leaks in src
PATCH 5/6 Fix leaks in src
g_key_file_get_string allocates memory that must be freed.
asprintf allocates memory that must be freed.
--- src/main.c | 1 + src/shared/shell.c | 1 + 2 files changed, 2 insertions(+)
src/main.c +1 -0
@@ -795,6 +795,7 @@ static void parse_config(GKeyFile *config)parse_br_config (config);parse_le_config (config); +g_free (str); }static void init_defaults (void )
src/shared/shell.c +1 -0
@@ -611,6 +611,7 @@ void bt_shell_prompt_input(const char *label, const char *msg, prompt->user_data = user_data;queue_push_tail (data.prompts, prompt); +free (str);return ; }
Signature · 1 line
2.31.1