Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 04 Mar 2013 22:30:40 UTC Commit: 4cc11946fc89e07d7bce65a868125f058d9ed365 https://github.com/geany/geany-plugins/commit/4cc11946fc89e07d7bce65a868125f...
Log Message: ----------- Scope: Fix mismatched allocator/deallocator
Modified Paths: -------------- scope/src/parse.c scope/src/program.c scope/src/thread.c scope/src/views.c
Modified: scope/src/parse.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -545,7 +545,7 @@ void parse_mode_update(const char *name, gint mode, gint value) if (!pm) { pm = (ParseMode *) array_append(parse_modes); - pm->name = strdup(pm_name); + pm->name = g_strdup(pm_name); pm->hb_mode = HB_DEFAULT; pm->mr_mode = MR_DEFAULT; pm->entry = TRUE;
Modified: scope/src/program.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -151,7 +151,7 @@ static void save_program_settings(void) if (!recent) { recent = (RecentProgram *) array_append(recent_programs); - recent->name = strdup(program_name); + recent->name = g_strdup(program_name);
for (recent->id = 1; recent->id < RECENT_COUNT; recent->id++) if ((recent_bitmap & (1 << recent->id)) == 0)
Modified: scope/src/thread.c 20 files changed, 10 insertions(+), 10 deletions(-) =================================================================== @@ -63,8 +63,8 @@ void on_thread_group_started(GArray *nodes)
if (group) { - free(group->pid); - group->pid = strdup(pid); + g_free(group->pid); + group->pid = g_strdup(pid); } } } @@ -79,7 +79,7 @@ void on_thread_group_exited(GArray *nodes) if (group && group->pid) { g_string_append(status, group->pid); - free(group->pid); + g_free(group->pid); group->pid = NULL; } else @@ -101,14 +101,14 @@ void on_thread_group_exited(GArray *nodes) void on_thread_group_added(GArray *nodes) { ThreadGroup *group = (ThreadGroup *) array_append(thread_groups); - group->gid = strdup(parse_lead_value(nodes)); + group->gid = g_strdup(parse_lead_value(nodes)); group->pid = NULL; }
static void thread_group_free(ThreadGroup *group) { - free(group->gid); - free(group->pid); + g_free(group->gid); + g_free(group->pid); }
void on_thread_group_removed(GArray *nodes) @@ -668,8 +668,8 @@ static void on_thread_selection_changed(GtkTreeSelection *selection, { GtkTreeIter iter;
- free(thread_id); - free(frame_id); + g_free(thread_id); + g_free(frame_id);
if (gtk_tree_selection_get_selected(selection, NULL, &iter)) { @@ -704,7 +704,7 @@ static void on_thread_selection_changed(GtkTreeSelection *selection, thread_state = THREAD_QUERY_FRAME; }
- frame_id = strdup("0"); + frame_id = g_strdup("0"); g_free(state); g_free(addr); } @@ -954,5 +954,5 @@ void thread_finalize(void) model_foreach(model, (GFunc) thread_iter_unmark, NULL); array_free(thread_groups, (GFreeFunc) thread_group_free); set_gdb_thread(NULL, FALSE); - free(thread_id); + g_free(thread_id); }
Modified: scope/src/views.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -486,7 +486,7 @@ static void on_command_send_button_clicked(G_GNUC_UNUSED GtkButton *button, gtk_text_buffer_set_text(command_text, text, -1); start = utils_skip_spaces(text); locale = gtk_toggle_button_get_active(command_locale) ? - utils_get_locale_from_utf8(start) : strdup(start); + utils_get_locale_from_utf8(start) : g_strdup(start); debug_send_command(N, locale); g_free(locale); gtk_widget_hide(command_dialog); @@ -495,7 +495,7 @@ static void on_command_send_button_clicked(G_GNUC_UNUSED GtkButton *button, { GtkTreePath *path; GtkTreeIter iter; - gchar *display = strdup(start); + gchar *display = g_strdup(start);
/* from ui_combo_box_add_to_history() */ if (model_find(command_model, &iter, COMMAND_TEXT, start))
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).