mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix memory leak error in lib/nodes/exec.cpp and lib/nodes/opal.cpp
This commit is contained in:
parent
13c4646ce8
commit
f3e8876627
2 changed files with 3 additions and 3 deletions
|
@ -232,7 +232,7 @@ int exec_write(struct vnode *n, struct sample *smps[], unsigned cnt, unsigned *r
|
|||
if (e->flush)
|
||||
e->proc->cout().flush();
|
||||
|
||||
delete line;
|
||||
delete[] line;
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
|
|
@ -128,8 +128,8 @@ int opal_print_global()
|
|||
{
|
||||
debug(LOG_OPAL | 2, "Controller ID: %u", params.controllerID);
|
||||
|
||||
auto *sbuf = new char[send_icons * 5];
|
||||
auto *rbuf = new char[recv_icons * 5];
|
||||
auto *sbuf = new (std::nothrow) char[send_icons * 5];
|
||||
auto *rbuf = new (std::nothrow) char[recv_icons * 5];
|
||||
|
||||
if (!sbuf || !rbuf)
|
||||
throw MemoryAllocationError();
|
||||
|
|
Loading…
Add table
Reference in a new issue