summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/trg-file-parser.c2
-rw-r--r--src/trg-torrent-add-dialog.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/trg-file-parser.c b/src/trg-file-parser.c
index 12f8b29..0a4a8c0 100644
--- a/src/trg-file-parser.c
+++ b/src/trg-file-parser.c
@@ -124,6 +124,8 @@ trg_torrent_file *trg_parse_torrent_file(const gchar *filename)
top_node = be_decoden(g_mapped_file_get_contents(mf), g_mapped_file_get_length(mf));
}
+ g_mapped_file_unref(mf);
+
if (!top_node) {
return NULL;
} else if (be_validate_node(top_node, BE_DICT)) {
diff --git a/src/trg-torrent-add-dialog.c b/src/trg-torrent-add-dialog.c
index fb0ba57..54f0684 100644
--- a/src/trg-torrent-add-dialog.c
+++ b/src/trg-torrent-add-dialog.c
@@ -157,7 +157,7 @@ static gpointer add_files_threadfunc(gpointer data)
files_thread_data->dir);
response = dispatch(files_thread_data->client, request);
- on_generic_interactive_action(response);
+ g_idle_add(on_generic_interactive_action, response);
}
g_str_slist_free(files_thread_data->list);