Skip to content

Commit 273e664

Browse files
committedMar 12, 2018
Fix some leaks in conversions
1 parent a0f6a2b commit 273e664

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎python/core/conversions.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ template <TYPE>
4949
QVector<TYPE> *t = new QVector<TYPE>(sipCpp->at(i));
5050
PyObject *tobj;
5151

52-
if ((tobj = sipConvertFromMappedType(t, qvector_type, sipTransferObj)) == NULL)
52+
if ((tobj = sipConvertFromNewType(t, qvector_type, NULL)) == NULL)
5353
{
5454
Py_DECREF(l);
5555
delete t;
@@ -126,7 +126,7 @@ template <TYPE>
126126
QVector<QVector<TYPE> > *t = new QVector<QVector<TYPE> >(sipCpp->at(i));
127127
PyObject *tobj;
128128

129-
if ((tobj = sipConvertFromMappedType(t, qvector_type, sipTransferObj)) == NULL)
129+
if ((tobj = sipConvertFromNewType(t, qvector_type, NULL)) == NULL)
130130
{
131131
Py_DECREF(l);
132132
delete t;
@@ -202,7 +202,7 @@ template <TYPE>
202202
QList<TYPE> *t = new QList<TYPE>(sipCpp->at(i));
203203
PyObject *tobj;
204204

205-
if ((tobj = sipConvertFromMappedType(t, qlist_type, sipTransferObj)) == NULL)
205+
if ((tobj = sipConvertFromNewType(t, qlist_type, NULL)) == NULL)
206206
{
207207
Py_DECREF(l);
208208
delete t;
@@ -470,7 +470,7 @@ template<TYPE>
470470
QMap<int, TYPE> *t = new QMap<int, TYPE>(*it);
471471

472472
PyObject *kobj = PyLong_FromLongLong(it.key());
473-
PyObject *tobj = sipConvertFromMappedType(t, qmap2, sipTransferObj);
473+
PyObject *tobj = sipConvertFromNewType(t, qmap2, sipTransferObj);
474474

475475
if (kobj == NULL || tobj == NULL || PyDict_SetItem(d, kobj, tobj) < 0)
476476
{

0 commit comments

Comments
 (0)
Please sign in to comment.