diff --git a/lib/nodes/exec.cpp b/lib/nodes/exec.cpp index a2e902f26..f7ca0c4d7 100644 --- a/lib/nodes/exec.cpp +++ b/lib/nodes/exec.cpp @@ -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; } diff --git a/lib/nodes/opal.cpp b/lib/nodes/opal.cpp index d333da439..e52a1f0d0 100644 --- a/lib/nodes/opal.cpp +++ b/lib/nodes/opal.cpp @@ -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();