Fixed PMD NullDeref issues in S3Utils.
Fixed PMD NullDeref issues in S3Utils.

(cherry picked from commit debcbcc1454789936407583fe0aba8e158b16cad)
Signed-off-by: Rohit Yadav <902b9eb5dd62819678163bd5e00fbf0cbc7c264b@shapeblue.com>

resmo/cloudstack,jcshen007/cloudstack,wido/cloudstack,resmo/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,wido/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,DaanHoogland/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,jcshen007/cloudstack,wido/cloudstack,jcshen007/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,resmo/cloudstack,resmo/cloudstack,jcshen007/cloudstack,DaanHoogland/cloudstack