Removed unnecessary null-pointer checks before calling FreeVec() and