mds: fixes for coverity scan

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>