core: Fix memory leaks

g_key_file_get_string allocates memory that must be freed.

asprintf allocates memory that must be freed.
This commit is contained in:
Steve Grubb 2021-05-14 10:00:42 -04:00 committed by Luiz Augusto von Dentz
parent 8d61942f27
commit ca769001a8
2 changed files with 2 additions and 0 deletions

View File

@ -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)

View File

@ -621,6 +621,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;
}