File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1799,6 +1799,8 @@ template<int, TYPE2*>
1799
1799
return NULL;
1800
1800
}
1801
1801
1802
+ Py_DECREF(valueobj);
1803
+ Py_DECREF(keyobj);
1802
1804
}
1803
1805
1804
1806
return d;
@@ -1997,9 +1999,7 @@ template <TYPE>
1997
1999
{
1998
2000
Py_DECREF(l);
1999
2001
2000
- if (tobj)
2001
- Py_DECREF(tobj);
2002
- else
2002
+ if (!tobj)
2003
2003
delete t;
2004
2004
2005
2005
return NULL;
@@ -2073,8 +2073,6 @@ template <TYPE>
2073
2073
2074
2074
PyObject *keyobj = PyLong_FromLong(it.key());
2075
2075
PyObject *pyOobj = sipConvertFromType(oobj, sipType_QgsFeature, sipTransferObj);
2076
- PyDict_SetItem(d, keyobj, pyOobj);
2077
-
2078
2076
if(pyOobj == NULL || keyobj == NULL || PyDict_SetItem(d, keyobj, pyOobj) < 0)
2079
2077
{
2080
2078
Py_DECREF(d);
@@ -2083,6 +2081,10 @@ template <TYPE>
2083
2081
{
2084
2082
Py_DECREF(pyOobj);
2085
2083
}
2084
+ else
2085
+ {
2086
+ delete oobj;
2087
+ }
2086
2088
2087
2089
if (keyobj)
2088
2090
{
You can’t perform that action at this time.
0 commit comments