Skip to content

Commit

Permalink
Fix Segmentation fault in RNLDeinit().
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxia Liang <xiaoxia.liang@intel.com>
  • Loading branch information
xiaoxial committed Oct 15, 2024
1 parent 98ecddb commit 2b334b9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Library/Raisr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1870,15 +1870,17 @@ RNLERRORTYPE RNLDeinit()

for (int threadIdx = 0; threadIdx < gThreadCount; threadIdx++)
{
if (gIppCtx.specY[threadIdx])
if (gIppCtx.specY && gIppCtx.specY[threadIdx])
ippsFree(gIppCtx.specY[threadIdx]);
if (gIppCtx.pbufferY[threadIdx])
if (gIppCtx.pbufferY && gIppCtx.pbufferY[threadIdx])
ippsFree(gIppCtx.pbufferY[threadIdx]);
for (int i = 0; i < gPasses; i++)
{
SAFE_ARR_DELETE(gIppCtx.segZones[i][threadIdx].inYUpscaled);
SAFE_ARR_DELETE(gIppCtx.segZones[i][threadIdx].inYUpscaled32f);
SAFE_ARR_DELETE(gIppCtx.segZones[i][threadIdx].raisr32f);
if (gIppCtx.segZones && gIppCtx.segZones[i]) {
SAFE_ARR_DELETE(gIppCtx.segZones[i][threadIdx].inYUpscaled);
SAFE_ARR_DELETE(gIppCtx.segZones[i][threadIdx].inYUpscaled32f);
SAFE_ARR_DELETE(gIppCtx.segZones[i][threadIdx].raisr32f);
}
}
}
SAFE_DELETE(gPool);
Expand Down

0 comments on commit 2b334b9

Please sign in to comment.