[sr-dev] git:5.2:fb989491: cdp: fix three coverity errors (ressource leaks and error checks)