diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-01-15 14:47:04 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-01-15 14:47:04 (GMT) |
commit | af2ac16182b6243f17e06ec75e441014159abe5e (patch) | |
tree | f0e82673bf5e63e3b06244c2139d8f10dca0203f /plugins | |
parent | 56e060d11c238ac7c7b3ecf0eb0527bbaebd5b4b (diff) |
Improved symbol resolving using fully defined locations.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/pychrysa/format/format.c | 9 |
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 { |