fixed trivial problem identified by clang analysis

Fixed trivial problem reported by clang static analysis.