[os_dbd] fix compiler warnings
[os_dbd] fix potential nullpointer dereference
[os_dbd] fix CID 28508