summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-10 18:20:25 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-10 18:20:25 +0100
commitfbc08f6ea80d36f86967d0f184a8d25ecaa9d314 (patch)
tree65e257c0491dea4bafac9bb72809cb3d4b6f1401
parentf34955f8585a6af650cb1ed6a36a230c182f05fb (diff)
Free value if invalid
-rw-r--r--jq.pyx1
1 files changed, 1 insertions, 0 deletions
diff --git a/jq.pyx b/jq.pyx
index 8736bbe..7ea6960 100644
--- a/jq.pyx
+++ b/jq.pyx
@@ -119,6 +119,7 @@ cdef object _jv_to_python(jv value):
cdef double number_value
if kind == JV_KIND_INVALID:
+ jv_free(value)
raise ValueError("Invalid value")
elif kind == JV_KIND_NULL:
python_value = None