Ensure NULL checks are done before dereferencing pointer.

After os_malloc and pointer assignment making sure that the
pointers are not dereferencing NULL

Change-Id: I585fa3b434e548f1c624cbc844774c5cbae12e5d
CRs-Fixed: 797025
1 file changed