Fix possible null de-reference
Fix possible null de-reference

If malloc returns NULL, the code would write to the pointer anyway and crash the system.
littlekernel/lk,GCrean/lk,M1cha/lk,minglun-tsai/lk,GCrean/lk,grub4android/lk,srodrig1/lk,GCrean/lk,ianloic/lk,grub4android/lk,ErikCorryGoogle/lk,travisg/lk,sndnvaps/lk,minglun-tsai/lk,pablomarx/lk,minglun-tsai/lk,nvll/lk,M1cha/lk,travisg/lk,GCrean/lk,travisg/lk,nvll/lk,nvll/lk,skabet/lk,hollanderic/lkstuff,pablomarx/lk,srodrig1/lk,sndnvaps/lk,ianloic/lk,minglun-tsai/lk,sndnvaps/lk,GCrean/lk,pablomarx/lk,srodrig1/lk,travisg/lk,hollanderic/lkstuff,M1cha/lk,grub4android/lk,grub4android/lk,ErikCorryGoogle/lk,sndnvaps/lk,nvll/lk,M1cha/lk,littlekernel/lk,sndnvaps/lk,skabet/lk,hollanderic/lkstuff,grub4android/lk,ErikCorryGoogle/lk,hollanderic/lkstuff,srodrig1/lk,ianloic/lk,ianloic/lk,pablomarx/lk,skabet/lk,nvll/lk,ErikCorryGoogle/lk,pablomarx/lk,skabet/lk,skabet/lk,littlekernel/lk,srodrig1/lk,M1cha/lk,littlekernel/lk