Skip to content

Commit 32cbb05

Browse files
authored
Use Py_DECREF after PyObject_CallObject call (#4163)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 14d1372 commit 32cbb05

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

third_party/intel/backend/driver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ def format_of(ty):
610610
Py_DECREF(args);
611611
if (!ret)
612612
return NULL;
613+
Py_DECREF(ret);
613614
}}
614615
615616
void * pStream = PyLong_AsVoidPtr(py_obj_stream);
@@ -630,6 +631,7 @@ def format_of(ty):
630631
Py_DECREF(args);
631632
if (!ret)
632633
return NULL;
634+
Py_DECREF(ret);
633635
}}
634636
if (PyErr_Occurred()) {{
635637
return NULL;

0 commit comments

Comments
 (0)