From 470252c221275cbc50d611a4186bd210904513f4 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 10 Jul 2026 18:25:08 +0100 Subject: Free value when it has unknown kind --- jq.pyx | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3