Skip to content
Permalink
Browse files

Merge pull request #6221 from nyalldawson/var_leak

Fix massive memory leak in PyQGIS, pt 1
  • Loading branch information
nyalldawson committed Feb 13, 2018
2 parents 0c6f223 + bbf3ed9 commit a1a45536a2031b409a7088624f3bae198abc3352
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/core/conversions.sip
@@ -1709,7 +1709,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;
}

0 comments on commit a1a4553

Please sign in to comment.
You can’t perform that action at this time.