diff options
| author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2020-09-08 15:57:14 +0300 |
|---|---|---|
| committer | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2020-09-09 13:45:15 +0300 |
| commit | a24ce4ccc0ace9aa0397472f5f4889e5756d8381 (patch) | |
| tree | 81467fc095f1316085e60f5032c838ee065f9d7b /jq.pyx | |
| parent | 52564dd2ba555b26048f54a1f3e9708fedefbb42 (diff) | |
Free invalid values
Even though "message-less" invalid values don't technically need
"freeing", doing so is supported by the library, and could be good for
uniformity and future-proofing.
Diffstat (limited to 'jq.pyx')
| -rw-r--r-- | jq.pyx | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -260,6 +260,7 @@ cdef class _ResultIterator(object): jv_free(error_message) raise ValueError(message) else: + jv_free(result) self._ready = False cdef bint _ready_next_input(self) except 1: @@ -274,6 +275,7 @@ cdef class _ResultIterator(object): jv_free(error_message) raise ValueError(u"parse error: " + message) else: + jv_free(value) raise StopIteration() |
