PR#3340 fix coverity issues 966593-966596

PR#3340