Closed abamara closed 4 years ago
Hello,
I found that there is a possible memory leak. sqlB is declared but never freed
try { var sqlB = new db.dbstmt(db2.dbconn); sqlB.execSync(msg.payload, function (rows) { if (!node.arraymode) { rows = rows.length == 0 ? [""] : rows; //issue 0.1.1 - if rows is empty, return an empty row rows.forEach(function (row) { msg.payload = row; node.send(msg); // bug - erase msg content corrected 0.0.9 - node.send({ topic: msg.topic, payload: row } ); }) } else { msg.payload = rows; node.send(msg); } //node.send([ null, { topic: msg.topic, control: 'end' }]); }); }
sqlB need to be freed like in catch part.
if (sqlB) { sqlB.close(); } delete sqlB;
Hi, indeed. will be corrected in the next release - as soon as possible. Thanks.
Closed . pb solved commit 87e975a
Hello,
I found that there is a possible memory leak. sqlB is declared but never freed
sqlB need to be freed like in catch part.