summaryrefslogtreecommitdiff
path: root/plugins/mobicore
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-01-26 21:39:34 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-01-26 21:39:34 (GMT)
commit8a7d7b3303dee1a381893391c04acab35dec6942 (patch)
treedca8ae17ad327c215f58e40f0a200488c651afcf /plugins/mobicore
parent304445ae3f7a159be55fa91b95428251ef8a362e (diff)
Cleaned some format loading processes.
Diffstat (limited to 'plugins/mobicore')
-rw-r--r--plugins/mobicore/mclf.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/plugins/mobicore/mclf.c b/plugins/mobicore/mclf.c
index 7697d15..653ffaa 100644
--- a/plugins/mobicore/mclf.c
+++ b/plugins/mobicore/mclf.c
@@ -210,24 +210,19 @@ GBinFormat *g_mclf_format_new(GBinContent *content, GExeFormat *parent, GtkStatu
g_binary_format_set_content(G_BIN_FORMAT(result), content);
-
-
if (!read_mclf_header(result, &result->header, result->endian))
- {
- /* TODO */
- return NULL;
- }
+ goto gmfn_error;
+ if (!load_mclf_symbols(result))
+ goto gmfn_error;
+ return G_BIN_FORMAT(result);
- if (!load_mclf_symbols(result))
- {
- /* TODO */
- return NULL;
- }
+ gmfn_error:
+ g_object_unref(G_OBJECT(result));
- return G_BIN_FORMAT(result);
+ return NULL;
}