mirror of
https://github.com/samba-team/samba.git
synced 2025-01-04 05:18:06 +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 used to be commit fa500c77e3
)
This commit is contained in:
parent
39cf300869
commit
9a55edce96
@ -1,7 +1,7 @@
|
||||
/* -*- c-file-style: "python"; indent-tabs-mode: nil; -*-
|
||||
|
||||
Python wrapper for Samba tdb pack/unpack functions
|
||||
Copyright (C) Martin Pool 2002
|
||||
Copyright (C) Martin Pool 2002, 2003
|
||||
|
||||
|
||||
NOTE PYTHON STYLE GUIDE
|
||||
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user