Remove memory leak on resetDriver() when handle TERM signal enabled

fixes #14