summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thumbnails.c2
-rw-r--r--window_main.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/thumbnails.c b/thumbnails.c
index 2fe763c..d669c99 100644
--- a/thumbnails.c
+++ b/thumbnails.c
@@ -82,7 +82,7 @@ GdkPixbuf *get_thumbnail(const gchar *filepath) {
"tEXt::Software", "walls",
NULL)) {
g_warning("%s", error->message);
- g_free(error);
+ g_error_free(error);
}
g_free(thumbname);
diff --git a/window_main.c b/window_main.c
index c62b15b..4038206 100644
--- a/window_main.c
+++ b/window_main.c
@@ -129,7 +129,7 @@ static void load_pixbuf(const gchar *filepath) {
orig_pixbuf = gdk_pixbuf_new_from_file(filepath, &error);
if(!orig_pixbuf) {
g_warning("%s", error->message);
- g_free(error);
+ g_error_free(error);
return;
}
@@ -198,7 +198,7 @@ void on_foldtree_selection_changed(GtkTreeSelection *treeselection, gpointer use
if(!thumb_thread) {
g_warning("%s", error->message);
- g_free(error);
+ g_error_free(error);
}
}
}
@@ -224,7 +224,7 @@ void on_thumbview_selection_changed(GtkIconView *iconview, gpointer user_data) {
g_value_unset(&value);
}
- g_list_foreach(list, gtk_tree_path_free, NULL);
+ g_list_foreach(list, (GFunc)gtk_tree_path_free, NULL);
g_list_free(list);
}
}
@@ -255,7 +255,7 @@ void on_add_dir_action_activate(GtkAction *action, gpointer user_data) {
add_thread = g_thread_create(add_dir_thread, strdup(directory), FALSE, &error);
if(!add_thread) {
g_warning("%s", error->message);
- g_free(error);
+ g_error_free(error);
}
}
gtk_widget_destroy(dialog);
@@ -281,7 +281,7 @@ int gui_main(int argc, char **argv) {
builder = gtk_builder_new();
if(!gtk_builder_add_from_string(builder, ui_string, -1, &error)) {
g_warning("%s", error->message);
- g_free(error);
+ g_error_free(error);
return 1;
}