Fixed the remaining static analyzer warnings