# HG changeset patch # User Alain Mazy # Date 1693232317 -7200 # Node ID 1029689d7b6e39bc254c0beffa151312a82c919b # Parent 32a67788a3361e1d4c7ae63c2dff80fa76a6316c fix diff -r 32a67788a336 -r 1029689d7b6e Sources/RestCallbacks.cpp --- a/Sources/RestCallbacks.cpp Mon Aug 28 13:08:44 2023 +0200 +++ b/Sources/RestCallbacks.cpp Mon Aug 28 16:18:37 2023 +0200 @@ -133,7 +133,6 @@ std::unique_ptr pyHeaders; std::vector > pyHeaderValues; std::unique_ptr pyBody; - std::unique_ptr pyGroups; PythonString pyMethod(lock, method); PyDict_SetItemString(kw.GetPyObject(), "method", pyMethod.GetPyObject()); @@ -142,10 +141,10 @@ for (uint32_t i = 0; i < request->groupsCount; i++) { PythonString tmp(lock, request->groups[i]); - PyTuple_SetItem(pyGroups->GetPyObject(), i, tmp.Release()); // this PyTuple_SetItem method "steals" a reference -> no need to manage memory by ourselves ! + PyTuple_SetItem(pyGroups.GetPyObject(), i, tmp.Release()); // this PyTuple_SetItem method "steals" a reference -> no need to manage memory by ourselves ! } - PyDict_SetItemString(kw.GetPyObject(), "groups", pyGroups->GetPyObject()); + PyDict_SetItemString(kw.GetPyObject(), "groups", pyGroups.GetPyObject()); if (request->method == OrthancPluginHttpMethod_Get) {