1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-13 16:23:50 +03:00

(Merge from APPLIANCE_HEAD)

CR1829: Fix memory leak when unpacking 'B' buffers in Python.

(PyList_Append creates a new reference to the added object, and so we
have to release the existing one.)
This commit is contained in:
Martin Pool
-
parent 634f20dff6
commit 55e114f596

View File

@@ -638,6 +638,9 @@ pytdbunpack_buffer(char **pbuf, int *plen, PyObject *val_list)
if (PyList_Append(val_list, str_obj) == -1)
goto failed;
Py_DECREF(len_obj);
Py_DECREF(str_obj);
return val_list;
failed: