From 68215ea14cfbaa4966f830d85d98f7f49b416455 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Wed, 27 May 2026 16:06:21 -0700 Subject: [Python] Ensure that BNFreeParseError is used to free the error returned by BNParseExpression --- python/binaryview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index 5a63248f..d97e9f4d 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -10872,7 +10872,7 @@ to a the type "tagRECT" found in the typelibrary "winX64common" if not core.BNParseExpression(self.handle, expression, offset, here, errors): assert errors.value is not None, "core.BNParseExpression returned errors set to None" error_str = errors.value.decode("utf-8") - core.free_string(errors) + core.BNFreeParseError(ctypes.cast(errors, ctypes.POINTER(ctypes.c_byte))) raise ValueError(error_str) return offset.value -- cgit v1.3.1