diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-02-05 22:03:38 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-02-05 22:03:38 (GMT) |
commit | 17f591f2230ac66394467d5e5eefe71cb259637d (patch) | |
tree | 1664e994b2904e5e9009027fc57749a11667365b /plugins/elf/strings.c | |
parent | ff187d24b7441e88e1f0361d59b0f6f55851791f (diff) |
Fixed a huge number of memory leaks.
Diffstat (limited to 'plugins/elf/strings.c')
-rw-r--r-- | plugins/elf/strings.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/elf/strings.c b/plugins/elf/strings.c index f6be4a8..fe37a0d 100644 --- a/plugins/elf/strings.c +++ b/plugins/elf/strings.c @@ -345,6 +345,12 @@ static bool do_elf_string_loading(GElfLoading *loading, GElfFormat *format, phys g_raw_instruction_mark_as_string(G_RAW_INSTRUCTION(instr), true); + /** + * Comme g_preload_info_add_instruction() peut consommer l'instruction + * et qu'on réutilise cette dernière ensuite avec g_arch_instruction_get_range()... + */ + g_object_ref(G_OBJECT(instr)); + inserted = g_preload_info_add_instruction(base->info, instr); result |= inserted; @@ -373,6 +379,8 @@ static bool do_elf_string_loading(GElfLoading *loading, GElfFormat *format, phys } + g_object_unref(G_OBJECT(instr)); + /* Conclusion */ skip_first: |