libmix: Critical klocwork issues

BZ: 23921

added code for double check
Signed-off-by: nguo <nana.n.guo@intel.com>

Change-Id: Ibc43039b29efe8d5c39ffc180da849d6d9387336
Reviewed-on: http://android.intel.com:8080/36376
Reviewed-by: Ding, Haitao <haitao.ding@intel.com>
Tested-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
7 files changed