[sr-dev] git:5.1:b5f12075: cdp: fix two errors from coverty scan (missing check, var initialization)