Skip to content

Commit ecbbecd

Browse files
authored
Allocate IWORK to hold at least the one element for workspace queries
1 parent efbd2fd commit ecbbecd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

LAPACKE/src/lapacke_strsen.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ lapack_int API_SUFFIX(LAPACKE_strsen)( int matrix_layout, char job, char compq,
7777
info = LAPACK_WORK_MEMORY_ERROR;
7878
goto exit_level_0;
7979
}
80+
} else {
81+
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) );
82+
if( iwork == NULL ) {
83+
info = LAPACK_WORK_MEMORY_ERROR;
84+
goto exit_level_0;
85+
}
8086
}
8187
work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
8288
if( work == NULL ) {

0 commit comments

Comments
 (0)