aboutsummaryrefslogtreecommitdiff
path: root/LAPACKE/src/lapacke_dlantr.c
diff options
context:
space:
mode:
Diffstat (limited to 'LAPACKE/src/lapacke_dlantr.c')
-rw-r--r--LAPACKE/src/lapacke_dlantr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/LAPACKE/src/lapacke_dlantr.c b/LAPACKE/src/lapacke_dlantr.c
index 7ac947f0..9f66725e 100644
--- a/LAPACKE/src/lapacke_dlantr.c
+++ b/LAPACKE/src/lapacke_dlantr.c
@@ -53,7 +53,7 @@ double LAPACKE_dlantr( int matrix_layout, char norm, char uplo, char diag,
/* Allocate memory for working array(s) */
if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
LAPACKE_lsame( norm, 'O' ) ) {
- work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,MAX(m,n)) );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;