From: Jens Axboe Date: Mon, 26 Mar 2012 12:28:36 +0000 (+0200) Subject: goptions: ensure that gopt_str_multi options get freed X-Git-Tag: gfio-0.1~40 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=bb3d3c4d6cdb52f13353d0019b34de59596e5091 goptions: ensure that gopt_str_multi options get freed Was missing the destroy handler. Signed-off-by: Jens Axboe --- diff --git a/goptions.c b/goptions.c index b84a047a..87d92e69 100644 --- a/goptions.c +++ b/goptions.c @@ -337,6 +337,14 @@ static void gopt_str_multi_toggled(GtkToggleButton *button, gpointer data) gopt_changed(&m->gopt); } +static void gopt_str_multi_destroy(GtkWidget *w, gpointer data) +{ + struct gopt_str_multi *m = (struct gopt_str_multi *) data; + + free(m); + gtk_widget_destroy(w); +} + static struct gopt *gopt_new_str_multi(struct gopt_job_view *gjv, struct fio_option *o, unsigned int idx) { @@ -369,6 +377,7 @@ static struct gopt *gopt_new_str_multi(struct gopt_job_view *gjv, i++; } + g_signal_connect(G_OBJECT(m->gopt.box), "destroy", G_CALLBACK(gopt_str_multi_destroy), m); return &m->gopt; }