瀏覽代碼

Add missing Py_DECREF in scatter function.

Benno Evers 6 年之前
父節點
當前提交
8baa5821ce
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      matplotlibcpp.h

+ 1 - 0
matplotlibcpp.h

@@ -476,6 +476,7 @@ bool scatter(const std::vector<NumericX>& x,
     PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_scatter, plot_args, kwargs);
 
     Py_DECREF(plot_args);
+    Py_DECREF(kwargs);
     if(res) Py_DECREF(res);
 
     return res;