Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: GitHub noreply@github.com Date: Sun, 19 May 2024 12:56:52 UTC Commit: 6e0cb584e2c9b745ecaba61165db79ea58fef8ca https://github.com/geany/geany-plugins/commit/6e0cb584e2c9b745ecaba61165db79...
Log Message: ----------- Merge pull request #1339 from gkatev/codenav_fix_old_model_segv
codenav/goto_file: Fix use-after-free crash
Modified Paths: -------------- codenav/src/goto_file.c
Modified: codenav/src/goto_file.c 6 lines changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -163,8 +163,11 @@ directory_check(GtkEntry* entry, GtkEntryCompletion* completion) if (old_model != NULL) { /* Restore the no-sub-directory model */ log_debug("Restoring old model!"); + gtk_entry_completion_set_model (completion, old_model); + g_object_unref(old_model); old_model = NULL; + g_free(curr_dir); curr_dir = NULL; } @@ -185,7 +188,10 @@ directory_check(GtkEntry* entry, GtkEntryCompletion* completion)
/* Save the completion_mode for future restore. */ if (old_model == NULL) + { old_model = gtk_entry_completion_get_model(completion); + g_object_ref(old_model); + }
log_debug("New completion list!");
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org