summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-10 18:25:08 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-10 18:25:08 +0100
commit470252c221275cbc50d611a4186bd210904513f4 (patch)
treea273f5efa86bcc85f9718beaa00a5320a2b181d1
parent1972eee6be452da55fc2f6eebc14eea043e42732 (diff)
Free value when it has unknown kind
-rw-r--r--jq.pyx1
1 files changed, 1 insertions, 0 deletions
diff --git a/jq.pyx b/jq.pyx
index 5a9704c..755aba5 100644
--- a/jq.pyx
+++ b/jq.pyx
@@ -160,6 +160,7 @@ cdef object _jv_to_python(jv value):
jv_free(property_key)
idx = jv_object_iter_next(value, idx)
else:
+ jv_free(value)
raise ValueError("Invalid value kind: " + str(kind))
jv_free(value)
return python_value