[ros-diffs] [cgutman] 35898: - Move the NULL check immediately after the memory is allocated