[ros-diffs] [janderwald] 29445: - improve error checking - fix a memory leak