Skip to content
Permalink
Browse files

Fix massive memory leak in PyQGIS, pt 1

  • Loading branch information
nyalldawson committed Jan 30, 2018
1 parent 0a9f019 commit bbf3ed9d4e4327f3f131649c20f3fd3707f8447f
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/core/conversions.sip
@@ -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;
}

0 comments on commit bbf3ed9

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