transit: add NULL check for memory allocation.
transit: add NULL check for memory allocation.

Summary: Adding Null checking when allocate memory.

Reviewers: Hermet, seoz

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2662

Signed-off-by: Cedric BAIL <240633aa59d25638de9800ef43a88ad2e208d24d@osg.samsung.com>

tasn/elementary,FlorentRevest/Elementary,FlorentRevest/Elementary,rvandegrift/elementary,tasn/elementary,tasn/elementary,FlorentRevest/Elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,rvandegrift/elementary,rvandegrift/elementary,tasn/elementary