At this point we have a connection that must be returned back to the pool at the end of this function. The current implementation relies on the developer to call `connection.release();` in all places where `callback` called. It's easy to forget that and introduce a memory leak.

A better solution is to replace the callback function by a wrapper that will release the connection:
```js
callback = (function(cb) {
  return function releaseConnectionAndReturn(err, result) {
    connection.release();
    cb(err, result);
})(cb);
```

and keep calling just the new callback everywhere below.