summaryrefslogtreecommitdiff
path: root/plugins/androhelpers/try_n_catch.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/androhelpers/try_n_catch.c')
-rw-r--r--plugins/androhelpers/try_n_catch.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/androhelpers/try_n_catch.c b/plugins/androhelpers/try_n_catch.c
index 780fa59..28f7061 100644
--- a/plugins/androhelpers/try_n_catch.c
+++ b/plugins/androhelpers/try_n_catch.c
@@ -237,8 +237,8 @@ static void mark_exception_handlers(const GLoadedBinary *binary, uleb128_t size,
static caught_exception **build_all_destinations_list(const GLoadedBinary *binary, const GBinRoutine *routine, const encoded_catch_handler_list *hlist, size_t **count)
{
caught_exception **result; /* Liste de listes à retourner */
- GDexFormat *format; /* Format du binaire chargé */
vmpa_t start; /* Début du code de la routine */
+ GDexFormat *format; /* Format du binaire chargé */
GArchProcessor *proc; /* Processeur de l'architecture*/
GArchInstruction *instrs; /* Instructions Dalvik */
uleb128_t i; /* Boucle de parcours #1 */
@@ -248,10 +248,10 @@ static caught_exception **build_all_destinations_list(const GLoadedBinary *binar
caught_exception *excep; /* Raccourci confortable */
GDataType *type; /* Type de l'exception */
- format = G_DEX_FORMAT(g_loaded_binary_get_format(binary));
-
start = g_binary_routine_get_address(routine);
+ format = G_DEX_FORMAT(g_loaded_binary_get_format(binary));
+
proc = g_loaded_binary_get_processor(binary);
instrs = g_arch_processor_get_disassembled_instructions(proc);
instrs = g_arch_instruction_find_by_address(instrs, start, true);
@@ -312,6 +312,7 @@ static caught_exception **build_all_destinations_list(const GLoadedBinary *binar
}
g_object_unref(G_OBJECT(proc));
+ g_object_unref(G_OBJECT(format));
return result;
@@ -448,6 +449,8 @@ bool process_exception_handlers(GLoadedBinary *binary, bool link)
}
+ g_object_unref(G_OBJECT(format));
+
return true;
}