Skip to content

Commit

Permalink
free arrays only if allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
oguyon committed Sep 15, 2024
1 parent 4fa8677 commit fdba300
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugins/milk-extra-src/linalgebra/SGEMM.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,15 @@ errno_t computeSGEMM(
0.0, outimg->im->array.F, outMdim);
}

printf("Freeing float arrays\n");
fflush(stdout);


if (imginA.md->datatype == _DATATYPE_FLOAT )
if (imginA.md->datatype != _DATATYPE_FLOAT )
{
free(imarrayA);
}

if (imginB.md->datatype == _DATATYPE_FLOAT )
if (imginB.md->datatype != _DATATYPE_FLOAT )
{
free(imarrayB);
}
Expand Down

0 comments on commit fdba300

Please sign in to comment.