Fix cppcheck in ConfigService.cpp

This was originally trac [#10618](http://trac.mantidproject.org/mantid/ticket/10618).

**To test:** Look at the changeset and that the issue went away in the [cppcheck build of develop](http://builds.mantidproject.org/view/Static%20Analysis/job/cppcheck_develop/).