File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
unified-runtime/source/loader/layers/sanitizer Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -153,11 +153,9 @@ ur_result_t ShadowMemoryGPU::Destroy() {
153
153
Context, (void *)MappedPtr, PageSize));
154
154
UR_CALL (getContext ()->urDdiTable .PhysicalMem .pfnRelease (PhysicalMem));
155
155
}
156
- if (ShadowBegin != 0 ) {
157
- UR_CALL (getContext ()->urDdiTable .VirtualMem .pfnFree (
158
- Context, (const void *)ShadowBegin, GetShadowSize ()));
159
- ShadowBegin = ShadowEnd = 0 ;
160
- }
156
+ UR_CALL (getContext ()->urDdiTable .VirtualMem .pfnFree (
157
+ Context, (const void *)ShadowBegin, GetShadowSize ()));
158
+ ShadowBegin = ShadowEnd = 0 ;
161
159
}
162
160
163
161
// NOTE: Context is managed by base class, so it needn't release here
Original file line number Diff line number Diff line change @@ -253,11 +253,9 @@ ur_result_t ShadowMemoryGPU::Destroy() {
253
253
Context, (void *)MappedPtr, PageSize));
254
254
UR_CALL (getContext ()->urDdiTable .PhysicalMem .pfnRelease (PhysicalMem));
255
255
}
256
- if (ShadowBegin != 0 ) {
257
- UR_CALL (getContext ()->urDdiTable .VirtualMem .pfnFree (
258
- Context, (const void *)ShadowBegin, GetShadowSize ()));
259
- ShadowBegin = ShadowEnd = 0 ;
260
- }
256
+ UR_CALL (getContext ()->urDdiTable .VirtualMem .pfnFree (
257
+ Context, (const void *)ShadowBegin, GetShadowSize ()));
258
+ ShadowBegin = ShadowEnd = 0 ;
261
259
}
262
260
263
261
UR_CALL (ReleaseCleanShadow ());
You can’t perform that action at this time.
0 commit comments