Revision: 19270
http://sourceforge.net/p/edk2/code/19270
Author: vanjeff
Date: 2015-12-15 06:00:10 +0000 (Tue, 15 Dec 2015)
Log Message:
-----------
MdeModulePkg UfsPassThru: ASSERT if params are NULL in SignalCallerEvent
In function SignalCallerEvent(), 'Private' and 'TransReq' are dereferenced
before NULL checking.
Since the function assumes that both 'Private' and 'TransReq' passed in
are not NULL pointer, this commit will add an ASSERT to make sure the
above assumption is satisfied.
(Sync patch r19266 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/19266
Modified Paths:
--------------
branches/UDK2015/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
Modified: branches/UDK2015/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
===================================================================
--- branches/UDK2015/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
2015-12-15 05:59:34 UTC (rev 19269)
+++ branches/UDK2015/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
2015-12-15 06:00:10 UTC (rev 19270)
@@ -2191,6 +2191,8 @@
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
EFI_EVENT CallerEvent;
+ ASSERT ((Private != NULL) && (TransReq != NULL));
+
UfsHc = Private->UfsHostController;
CallerEvent = TransReq->CallerEvent;
@@ -2214,10 +2216,9 @@
TransReq->CmdDescHost
);
}
- if (TransReq != NULL) {
- FreePool (TransReq);
- }
+ FreePool (TransReq);
+
gBS->SignalEvent (CallerEvent);
return;
}
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits