LF-2478 [#ccc] fix the dereferencing null pointer
Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com>
This commit is contained in:
parent
74a6e073f4
commit
c9f470a8bf
|
@ -745,13 +745,12 @@ gckKERNEL_Construct(
|
|||
return gcvSTATUS_OK;
|
||||
|
||||
OnError:
|
||||
gckOS_SetGPUPower(Os, kernel->core, gcvFALSE, gcvFALSE);
|
||||
*Kernel = gcvNULL;
|
||||
|
||||
if (kernel != gcvNULL)
|
||||
{
|
||||
gckOS_SetGPUPower(Os, kernel->core, gcvFALSE, gcvFALSE);
|
||||
gckKERNEL_Destroy(kernel);
|
||||
}
|
||||
*Kernel = gcvNULL;
|
||||
|
||||
/* Return the error. */
|
||||
gcmkFOOTER();
|
||||
|
|
Loading…
Reference in New Issue