summaryrefslogtreecommitdiff
path: root/src/trg-file-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/trg-file-parser.c')
-rw-r--r--src/trg-file-parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/trg-file-parser.c b/src/trg-file-parser.c
index c79ec76..12f8b29 100644
--- a/src/trg-file-parser.c
+++ b/src/trg-file-parser.c
@@ -116,8 +116,9 @@ trg_torrent_file *trg_parse_torrent_file(const gchar *filename)
mf = g_mapped_file_new(filename, FALSE, &error);
if (error) {
- g_error("%s",error->message);
+ g_message("%s",error->message);
g_error_free(error);
+ g_mapped_file_unref(mf);
return NULL;
} else {
top_node = be_decoden(g_mapped_file_get_contents(mf), g_mapped_file_get_length(mf));