Fix a bug Coverity found.