aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimoney, Daniel (dt5972) <dtimoney@att.com>2017-03-14 15:10:54 +0000
committerTimoney, Daniel (dt5972) <dtimoney@att.com>2017-03-14 15:11:11 +0000
commit02fb35fa2db2cc0ed8e8f3a735b41d8aacc0f383 (patch)
tree3ddd2c57494760925994a5ec1410420de34f0aaf
parent575be0db5aff2505026238d8e73b7d662efb070f (diff)
[ADMPORTAL] Connection leak fix
Added connection.release() Change-Id: I1caeb4e9ea69099e37e8dc0c3869e1100699b40b Signed-off-by: Timoney, Daniel (dt5972) <dtimoney@att.com> Former-commit-id: 18e4ba71f5b4c553e045c6d02e1a0a5a000a2d6b
-rw-r--r--admportal/server/router/routes/dbRoutes.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/admportal/server/router/routes/dbRoutes.js b/admportal/server/router/routes/dbRoutes.js
index d2f40b52..34a90c7b 100644
--- a/admportal/server/router/routes/dbRoutes.js
+++ b/admportal/server/router/routes/dbRoutes.js
@@ -275,11 +275,13 @@ exports.saveUser = function(req,res){
connection.query(sql, function(err,result){
if(err){
+ connection.release();
res.render("pages/signup", {result:{code:'error', msg:"Unable to get database connection. " + String(err)},header:process.env.MAIN_MENU});
return;
}
if (result.length == 1 || result.length > 1)
{
+ connection.release();
res.render("pages/signup", {result:{code:'error', msg:'User Information already exists.'},header:process.env.MAIN_MENU});
return;
}