Skip to content

Commit

Permalink
solve the free_signal_data
Browse files Browse the repository at this point in the history
  • Loading branch information
Easyghost195 committed Dec 4, 2018
1 parent 1dd5bde commit b696658
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gmpv_preferences_dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ static gboolean key_press_handler(GtkWidget *widget, GdkEventKey *event)
->key_press_event(widget, event);
}

static void free_signal_data(gpointer data, GClosure *closure)
{
g_free(data);
}

static GtkWidget *build_page( const PreferencesDialogItem *items,
GSettings *settings )
{
Expand Down Expand Up @@ -173,11 +178,6 @@ static GtkWidget *build_page( const PreferencesDialogItem *items,
gtk_widget_set_size_request(widget, 100, -1);
gtk_file_chooser_set_filename(chooser, filename);

void free_data(gpointer data, GClosure *closure)
{
g_free(data);
}

/* For simplicity, changes made to the GSettings
* database externally won't be reflected immediately
* for this type of widget.
Expand All @@ -186,7 +186,7 @@ static GtkWidget *build_page( const PreferencesDialogItem *items,
"file-set",
G_CALLBACK(file_set_handler),
g_strdup(key),
free_data,
free_signal_data,
0 );

g_free(filename);
Expand Down

0 comments on commit b696658

Please sign in to comment.