diff options
author | Martin Pool <mbp@samba.org> | 2003-02-20 03:35:11 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2003-02-20 03:35:11 +0000 |
commit | 9a55edce9635b6c19d35d73786e71d77e28a98c0 (patch) | |
tree | 8b51b545ebd8de2a1f0f9e0e40a16970f2b997af /source3 | |
parent | 39cf3008693863d9ee521bd0634b75e64c276345 (diff) | |
download | samba-9a55edce9635b6c19d35d73786e71d77e28a98c0.tar.gz samba-9a55edce9635b6c19d35d73786e71d77e28a98c0.tar.bz2 samba-9a55edce9635b6c19d35d73786e71d77e28a98c0.zip |
(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 fa500c77e338337cafe5b46cadf9b104e920e823)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/python/py_tdbpack.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/python/py_tdbpack.c b/source3/python/py_tdbpack.c index 6181a4918e..243cb44683 100644 --- a/source3/python/py_tdbpack.c +++ b/source3/python/py_tdbpack.c @@ -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: |