summaryrefslogtreecommitdiff
path: root/jq.pyx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-10 18:38:33 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-10 18:38:33 +0100
commit11432f7a08fd0795df7617d1e01bf39a6706f24a (patch)
tree1344d481df4821ed7be34a71aff6a794e76656e0 /jq.pyx
parentc9c88166beaa21524ad7f31e1b15bee5d711b0c7 (diff)
Fix leak when slurping invalid text
Diffstat (limited to 'jq.pyx')
-rw-r--r--jq.pyx3
1 files changed, 3 insertions, 0 deletions
diff --git a/jq.pyx b/jq.pyx
index 6c21b57..7d2875b 100644
--- a/jq.pyx
+++ b/jq.pyx
@@ -433,6 +433,9 @@ cdef class _ResultIterator(object):
except StopIteration:
self._slurp = False
break
+ except:
+ jv_free(value)
+ raise
else:
value = self._parse_next_input()