summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-02-03 22:13:40 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-02-03 22:20:36 (GMT)
commit9b35b89fce2499d5352f5323baec53abbf9a4af2 (patch)
tree49dde922a235f7d11cc8db63c8e0ac1d26f530e7 /src/format
parent10aa517f3a26dd9e4f96f78e62ba1c87e91c7243 (diff)
Fixed various memory leaks.
Diffstat (limited to 'src/format')
-rw-r--r--src/format/format.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/format/format.c b/src/format/format.c
index 261f152..cd71a21 100644
--- a/src/format/format.c
+++ b/src/format/format.c
@@ -156,10 +156,9 @@ static void g_binary_format_init(GBinFormat *format)
static void g_binary_format_dispose(GBinFormat *format)
{
- if (format->demangler != NULL)
- g_object_unref(format->demangler);
+ g_clear_object(&format->demangler);
- g_object_unref(format->info);
+ g_clear_object(&format->info);
g_rw_lock_clear(&format->syms_lock);