Fix memory leak in DGEMV kernel (#187)

Memory is not freed for GEMV when MT kernel with called for NT = 1;
Fixed this by adding an extra check to make sure memory is freed.

AMD-Internal: [CPUPL-7352]
This commit is contained in:
Sharma, Shubham
2025-09-18 11:18:13 +05:30
committed by GitHub
parent a02020686c
commit 740fbdf50d

View File

@@ -1347,9 +1347,7 @@ void bli_dgemv_m_zen4_int_40x8_mt_Ndiv
}
temp_mem = bli_mem_buffer(&local_mem_buf);
if( temp_mem == NULL )
nt = 1;
if (local_mem_buf.size < temp_mem_size *sizeof(double))
if (local_mem_buf.size < temp_mem_size *sizeof(double) || (temp_mem == NULL) || (nt == 1) )
{
nt = 1;
if (bli_mem_is_alloc( &local_mem_buf ))