diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2006-02-06 23:54:54 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2006-02-06 23:54:54 +0000 |
commit | 3196dfeaf64419f82bf26aee9e810c754f3c508d (patch) | |
tree | 6aa8c1bfe07250d5ed0e339494254455f1278df1 /gtk | |
parent | bedb2dbe4cbb00064b544209b42c3f605eb632af (diff) | |
download | wireshark-3196dfeaf64419f82bf26aee9e810c754f3c508d.tar.gz |
- fix a leak
- register the funnel mini-api ASAP
svn path=/trunk/; revision=17189
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/funnel_stat.c | 13 | ||||
-rw-r--r-- | gtk/main.c | 6 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gtk/funnel_stat.c b/gtk/funnel_stat.c index 44cc885dd0..78d86d0e6a 100644 --- a/gtk/funnel_stat.c +++ b/gtk/funnel_stat.c @@ -81,8 +81,6 @@ struct _funnel_node_t { void* dummy; }; -static gboolean text_window_delete_event_cb(GtkWidget*, GdkEvent*, gpointer); - static void text_window_cancel_button_cb(GtkWidget *bt _U_, gpointer data) { funnel_text_window_t* tw = data; @@ -103,7 +101,6 @@ static void unref_text_win_cancel_bt_cb(GtkWidget *bt _U_, gpointer data) { tw->close_cb(tw->close_data); g_free(tw); - } static gboolean text_window_unref_del_event_cb(GtkWidget *win _U_, GdkEvent *event _U_, gpointer user_data) { @@ -118,7 +115,6 @@ static gboolean text_window_unref_del_event_cb(GtkWidget *win _U_, GdkEvent *eve g_free(tw); return TRUE; - } static gboolean text_window_delete_event_cb(GtkWidget *win _U_, GdkEvent *event _U_, gpointer user_data) @@ -332,6 +328,8 @@ static gboolean funnel_dlg_cb(GtkWidget *win _U_, gpointer user_data) window_destroy(GTK_WIDGET(dd->win)); + g_ptr_array_free(returns,FALSE); + return TRUE; } @@ -406,7 +404,7 @@ static void funnel_new_dialog(const gchar* title, gtk_widget_show(win); } -static const funnel_ops_t ops = { +static const funnel_ops_t funnel_ops = { new_text_window, text_window_set_text, text_window_append, @@ -447,9 +445,12 @@ static void register_menu_cb(const char *name, } +void initialize_funnel_ops(void) { + funnel_set_funnel_ops(&funnel_ops); +} + void register_tap_listener_gtkfunnel(void) { - funnel_set_funnel_ops(&ops); funnel_register_all_menus(register_menu_cb); } diff --git a/gtk/main.c b/gtk/main.c index b03473c50c..9dfadf8932 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -63,6 +63,7 @@ #include <epan/strutil.h> #include <epan/addr_resolv.h> #include <epan/emem.h> +#include <epan/funnel.h> /* general (not GTK specific) */ #include "file.h" @@ -1921,7 +1922,10 @@ main(int argc, char *argv[]) /* initialize memory allocation subsystem */ ep_init_chunk(); se_init_chunk(); - + + /* initialize the funnel mini-api */ + initialize_funnel_ops(); + #ifdef _WIN32 /* Load wpcap if possible. Do this before collecting the run-time version information */ load_wpcap(); |