AJCORE-1261 Resolved issues found using static analysis tool

- Fixed possible null pointer dereference issues
- Fixed possible memory leak

Change-Id: I5b4a96e13f5aecf58456fd0279b41f36702851e2
Signed-off-by: George Nash <georgen@qce.qualcomm.com>
Merge "AJCORE-1261 Resolved issues found using static analysis tool" into RB14.12