Allocate IWORK to hold at least the one element for workspace queries

This commit is contained in:
Martin Kroeker
2025-07-09 23:26:12 +02:00
committed by GitHub
parent ecbbecd48a
commit 2d56b7e6a2
+6
View File
@@ -78,6 +78,12 @@ lapack_int API_SUFFIX(LAPACKE_dtrsen)( int matrix_layout, char job, char compq,
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
} else {
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
}
work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) {