Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: GitHub noreply@github.com Date: Thu, 06 Apr 2023 20:54:08 UTC Commit: 406c6cd910dc64d4d8278508bbfebc1295946635 https://github.com/geany/geany/commit/406c6cd910dc64d4d8278508bbfebc12959466...
Log Message: ----------- Merge pull request #3443 from techee/tm_crash_fix
Prevent possible crash when using tm_workspace API by plugins
Modified Paths: -------------- src/tagmanager/tm_workspace.c
Modified: src/tagmanager/tm_workspace.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -79,7 +79,7 @@ static gboolean tm_create_workspace(void) theWorkspace->source_files = g_ptr_array_new(); theWorkspace->typename_array = g_ptr_array_new(); theWorkspace->global_typename_array = g_ptr_array_new(); - theWorkspace->source_file_map = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, + theWorkspace->source_file_map = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, free_ptr_array);
tm_ctags_init(); @@ -192,7 +192,7 @@ void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file) if (!file_arr) { file_arr = g_ptr_array_new(); - g_hash_table_insert(theWorkspace->source_file_map, source_file->short_name, file_arr); + g_hash_table_insert(theWorkspace->source_file_map, g_strdup(source_file->short_name), file_arr); } g_ptr_array_add(file_arr, source_file); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).