comparison Sources/DicomScpCallbacks.cpp @ 127:a862d554753f fix-leak

fixing leaks associated with setting integers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 30 Aug 2023 10:47:30 +0200
parents 9ffe8881f856
children c55b0583084b
comparison
equal deleted inserted replaced
126:9ffe8881f856 127:a862d554753f
336 { 336 {
337 PythonString tmp(lock, targetAet_); 337 PythonString tmp(lock, targetAet_);
338 PyDict_SetItemString(kw.GetPyObject(), "TargetAET", tmp.GetPyObject()); 338 PyDict_SetItemString(kw.GetPyObject(), "TargetAET", tmp.GetPyObject());
339 } 339 }
340 340
341 PyDict_SetItemString(kw.GetPyObject(), "OriginatorID", PyLong_FromUnsignedLong(originatorId_)); 341 {
342 PythonObject tmp(lock, PyLong_FromUnsignedLong(originatorId_));
343 PyDict_SetItemString(kw.GetPyObject(), "OriginatorID", tmp.GetPyObject());
344 }
342 345
343 PythonObject args(lock, PyTuple_New(0)); 346 PythonObject args(lock, PyTuple_New(0));
344 347
345 assert(moveScpCallback_ != NULL); 348 assert(moveScpCallback_ != NULL);
346 PythonObject result(lock, PyObject_Call(moveScpCallback_, args.GetPyObject(), kw.GetPyObject())); 349 PythonObject result(lock, PyObject_Call(moveScpCallback_, args.GetPyObject(), kw.GetPyObject()));