summaryrefslogtreecommitdiff
path: root/src/analysis/binary.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-11-03 14:01:38 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-11-03 14:01:38 (GMT)
commite5d58e1f70405012fd8fbe8d61937f92fa3583a9 (patch)
tree29b555020a18df0e91ffd10460693bbe40bed729 /src/analysis/binary.c
parent25576d8dd565547fe1178f7faa583a36718f98f8 (diff)
Counted references for each provided binary format.
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r--src/analysis/binary.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index e466c33..2563355 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -1461,9 +1461,13 @@ bool g_loaded_binary_attach_debug_info(GLoadedBinary *binary, GBinContent *conte
GExeFormat *g_loaded_binary_get_format(const GLoadedBinary *binary)
{
- /* TODO : inc ref ! */
+ GExeFormat *result; /* Instance à retourner */
- return binary->format;
+ result = binary->format;
+
+ g_object_ref(G_OBJECT(result));
+
+ return result;
}