Add pointer check for NULL before dereference it.
Signed-off-by: sfu5 Reviewed-by: tye git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12537 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -846,6 +846,7 @@ UpdateVariableCache (
|
||||
// If size of data changes, allocate pool and copy data.
|
||||
//
|
||||
Entry->Data = AllocatePool (DataSize);
|
||||
ASSERT (Entry->Data != NULL);
|
||||
Entry->DataSize = DataSize;
|
||||
CopyMem (Entry->Data, Data, DataSize);
|
||||
}
|
||||
|
Reference in New Issue
Block a user