Skip to content

Commit

Permalink
Fix massive memory leak in PyQGIS, pt 1
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 30, 2018
1 parent 0a9f019 commit bbf3ed9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/core/conversions.sip
Expand Up @@ -2249,7 +2249,11 @@ bool null_from_qvariant_converter( const QVariant *varp, PyObject **objp )
{
sWatchDog = true;
PyObject *vartype = sipConvertFromEnum( varp->type(), sipType_QVariant_Type );
*objp = PyObject_Call(( PyObject * )sipTypeAsPyTypeObject( sipType_QVariant ), PyTuple_Pack( 1, vartype ), nullptr );
PyObject *args = PyTuple_Pack( 1, vartype );
PyTypeObject *typeObj = sipTypeAsPyTypeObject( sipType_QVariant );
*objp = PyObject_Call(( PyObject * )typeObj, args, nullptr );
Py_DECREF(args);
Py_DECREF(vartype);
sWatchDog = false;
return true;
}
Expand Down

0 comments on commit bbf3ed9

Please sign in to comment.