diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-09-06 00:18:29 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-09-06 00:18:29 -0400 |
| commit | 89c2a2faabb7344c4bd540c7f14420a34326cfaf (patch) | |
| tree | 4aeb87da5807d4d28d15646d8e5143106f587ed3 /python | |
| parent | bd104cc1d88cc1cd56dc71e54032fe34168b4cf0 (diff) | |
Fix some memory leaks in the Python API
Diffstat (limited to 'python')
| -rw-r--r-- | python/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/__init__.py b/python/__init__.py index f32fa612..d5eca84a 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -4461,14 +4461,12 @@ class Function(object): @property def low_level_il(self): """Function low level IL (read-only)""" - return LowLevelILFunction(self.arch, core.BNNewLowLevelILFunctionReference( - core.BNGetFunctionLowLevelIL(self.handle)), self) + return LowLevelILFunction(self.arch, core.BNGetFunctionLowLevelIL(self.handle), self) @property def lifted_il(self): """Function lifted IL (read-only)""" - return LowLevelILFunction(self.arch, core.BNNewLowLevelILFunctionReference( - core.BNGetFunctionLiftedIL(self.handle)), self) + return LowLevelILFunction(self.arch, core.BNGetFunctionLiftedIL(self.handle), self) @property def function_type(self): @@ -6924,6 +6922,7 @@ class Architecture(object): variables[parse.variables[i].name] = Type(core.BNNewTypeReference(parse.variables[i].type)) for i in xrange(0, parse.functionCount): functions[parse.functions[i].name] = Type(core.BNNewTypeReference(parse.functions[i].type)) + BNFreeTypeParserResult(parse) return (TypeParserResult(types, variables, functions), error_str) def parse_types_from_source_file(self, filename, include_dirs = []): @@ -6964,6 +6963,7 @@ class Architecture(object): variables[parse.variables[i].name] = Type(core.BNNewTypeReference(parse.variables[i].type)) for i in xrange(0, parse.functionCount): functions[parse.functions[i].name] = Type(core.BNNewTypeReference(parse.functions[i].type)) + BNFreeTypeParserResult(parse) return (TypeParserResult(types, variables, functions), error_str) def register_calling_convention(self, cc): |
