diff --git a/lang/python/core/src/ecal_wrap.cxx b/lang/python/core/src/ecal_wrap.cxx index 7ab9165646..91d0214418 100644 --- a/lang/python/core/src/ecal_wrap.cxx +++ b/lang/python/core/src/ecal_wrap.cxx @@ -1522,7 +1522,8 @@ PyObject* mon_monitoring(PyObject* /*self*/, PyObject* /*args*/) } } - return(Py_BuildValue("iO", 0, retDict)); + auto* retVal = Py_BuildValue("iO", 0, retDict); Py_DECREF(retDict); + return(retVal); } /****************************************/ @@ -1566,7 +1567,8 @@ PyObject* mon_logging(PyObject* /*self*/, PyObject* /*args*/) } } - return(Py_BuildValue("iO", 0, retList)); + auto* retVal = Py_BuildValue("iO", 0, retList); Py_DECREF(retList); + return(retVal); } /****************************************/ diff --git a/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx b/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx index 6d126db3ef..17da3f73d7 100644 --- a/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx +++ b/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2019 Continental Corporation + * Copyright (C) 2016 - 2024 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -178,7 +178,7 @@ static PyObject* Meas_GetChannelNames(Meas *self, PyObject* /*args*/) for (const auto& channel : channel_names) { PyObject* ch = Py_BuildValue("s", channel.c_str()); - PyList_Append(channels, ch); + PyList_Append(channels, ch); Py_DECREF(ch); } return channels;