summaryrefslogtreecommitdiff
path: root/src/trg-file-parser.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-18 19:19:02 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-18 19:19:02 +0000
commitc86f130d7c337d7f1e3937d0a18b990fbbc5abed (patch)
treec26f853306a38c93e4417a7e96223f09050d0615 /src/trg-file-parser.c
parent97b9420e91e83043b4640b25732241e75d80dfee (diff)
fix for non-existant torrent files
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));