Fix use of uninitialized variables

Building with optimization in debug mode revealed code that could in
theory result in undefined behavior.
This commit is contained in:
Markus Mäkelä
2019-02-06 14:10:19 +02:00
parent cc6665c732
commit 08a05d3ab9
7 changed files with 12 additions and 9 deletions

View File

@ -149,7 +149,7 @@ public:
static MXS_ROUTER_SESSION* newSession(MXS_ROUTER* pInstance, MXS_SESSION* pSession)
{
RouterType* pRouter = static_cast<RouterType*>(pInstance);
RouterSessionType* pRouter_session;
RouterSessionType* pRouter_session = nullptr;
MXS_EXCEPTION_GUARD(pRouter_session = pRouter->newSession(pSession));