diff options
author | Eric Dong <eric.dong@intel.com> | 2014-06-26 03:24:25 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-06-26 03:24:25 +0000 |
commit | 523f48e771b1088c6e2cfddc5c56cde1ef9a2ab0 (patch) | |
tree | 91d3cdacf538e40a24922981037cd413af4f6123 /MdeModulePkg/Universal/PlatformDriOverrideDxe | |
parent | d0f65b21c58b958ba370e774c6fe3ddc5ff1f3c7 (diff) | |
download | edk2-platforms-523f48e771b1088c6e2cfddc5c56cde1ef9a2ab0.tar.xz |
Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15598 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PlatformDriOverrideDxe')
-rw-r--r-- | MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c index 3c55a785fc..0f0da166ad 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c @@ -123,10 +123,11 @@ DevicePathToStr ( TRUE
);
if (Text == NULL) {
- return AllocateCopyPool (sizeof (L"?"), L"?");
- } else {
- return Text;
+ Text = AllocateCopyPool (sizeof (L"?"), L"?");
+ ASSERT (Text != NULL);
}
+
+ return Text;
}
/**
|