When CustomCumulativeToken is not NULL, the CustomCumulativeData is expected non-NULL. Add 'ASSERT' statement to ensure this.
Cc: Star Zeng <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <[email protected]> --- PerformancePkg/Dp_App/Dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PerformancePkg/Dp_App/Dp.c b/PerformancePkg/Dp_App/Dp.c index 0f61b9d..e052216 100644 --- a/PerformancePkg/Dp_App/Dp.c +++ b/PerformancePkg/Dp_App/Dp.c @@ -13,7 +13,7 @@ Dp uses this information to group records in different ways. It also uses timer information to calculate elapsed time for each measurement. - Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR> (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -368,6 +368,7 @@ InitializeDp ( CustomCumulativeToken = ShellCommandLineGetValue (ParamPackage, StringDpOptionLc); if (CustomCumulativeToken != NULL) { CustomCumulativeData = AllocateZeroPool (sizeof (PERF_CUM_DATA)); + ASSERT (CustomCumulativeData != NULL); CustomCumulativeData->MinDur = 0; CustomCumulativeData->MaxDur = 0; CustomCumulativeData->Count = 0; -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

