summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/format
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysa/format')
-rw-r--r--plugins/pychrysa/format/format.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/pychrysa/format/format.c b/plugins/pychrysa/format/format.c
index 0628697..cc9e819 100644
--- a/plugins/pychrysa/format/format.c
+++ b/plugins/pychrysa/format/format.c
@@ -356,7 +356,10 @@ static PyObject *py_binary_format_find_symbol_at(PyObject *self, PyObject *args)
found = g_binary_format_find_symbol_at(format, get_internal_vmpa(py_vmpa), &symbol);
if (found)
+ {
result = pygobject_new(G_OBJECT(symbol));
+ g_object_unref(G_OBJECT(symbol));
+ }
else
{
result = Py_None;
@@ -401,7 +404,10 @@ static PyObject *py_binary_format_find_next_symbol_at(PyObject *self, PyObject *
found = g_binary_format_find_next_symbol_at(format, get_internal_vmpa(py_vmpa), &symbol);
if (found)
+ {
result = pygobject_new(G_OBJECT(symbol));
+ g_object_unref(G_OBJECT(symbol));
+ }
else
{
result = Py_None;
@@ -452,6 +458,9 @@ static PyObject *py_binary_format_resolve_symbol(PyObject *self, PyObject *args)
result = PyTuple_New(2);
PyTuple_SetItem(result, 0, pygobject_new(G_OBJECT(symbol)));
PyTuple_SetItem(result, 1, PyLong_FromUnsignedLongLong(diff));
+
+ g_object_unref(G_OBJECT(symbol));
+
}
else
{