Skip to content

Commit b78ef86

Browse files
committed
Add missing decref when error is thrown in decompressobj
1 parent 4afcfaa commit b78ef86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/isal/isal_zlibmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ isal_zlib_decompressobj_impl(PyObject *module, int wbits, PyObject *zdict)
793793
err = wbits_to_flag_and_hist_bits_inflate(wbits, &hist_bits, &flag);
794794
if (err < 0) {
795795
PyErr_Format(PyExc_ValueError, "Invalid wbits value: %d", wbits);
796+
Py_DECREF(self);
796797
return NULL;
797798
}
798799
else if (err == 0) {

0 commit comments

Comments
 (0)