AJCORE-1208 Fixed issues found using static analysis tool

Fixed possible NULL dereference issues.  Fixed double freeing
issue due to not assignment/copy functions.

Change-Id: Ibedfb75eff08c63ba2f1709eee8ba3d1ce7a17ab
Signed-off-by: George Nash <georgen@qce.qualcomm.com>
Merge "AJCORE-1208 Fixed issues found using static analysis tool"