diff --git a/mlprec/mld_c_diag_solver.f90 b/mlprec/mld_c_diag_solver.f90 index 87018ee9..8332784a 100644 --- a/mlprec/mld_c_diag_solver.f90 +++ b/mlprec/mld_c_diag_solver.f90 @@ -182,8 +182,8 @@ contains call psb_erractionsave(err_act) info = psb_success_ - call sv%dv%free(info) - + if (allocated(sv%dv)) call sv%dv%free(info) + if (allocated(sv%d)) then deallocate(sv%d,stat=info) if (info /= psb_success_) then diff --git a/mlprec/mld_d_diag_solver.f90 b/mlprec/mld_d_diag_solver.f90 index f1b18432..c4139e05 100644 --- a/mlprec/mld_d_diag_solver.f90 +++ b/mlprec/mld_d_diag_solver.f90 @@ -182,8 +182,8 @@ contains call psb_erractionsave(err_act) info = psb_success_ - call sv%dv%free(info) - + if (allocated(sv%dv)) call sv%dv%free(info) + if (allocated(sv%d)) then deallocate(sv%d,stat=info) if (info /= psb_success_) then diff --git a/mlprec/mld_s_diag_solver.f90 b/mlprec/mld_s_diag_solver.f90 index e7450211..1fc6c48e 100644 --- a/mlprec/mld_s_diag_solver.f90 +++ b/mlprec/mld_s_diag_solver.f90 @@ -182,8 +182,8 @@ contains call psb_erractionsave(err_act) info = psb_success_ - call sv%dv%free(info) - + if (allocated(sv%dv)) call sv%dv%free(info) + if (allocated(sv%d)) then deallocate(sv%d,stat=info) if (info /= psb_success_) then diff --git a/mlprec/mld_z_diag_solver.f90 b/mlprec/mld_z_diag_solver.f90 index b16d65cd..0baf0c57 100644 --- a/mlprec/mld_z_diag_solver.f90 +++ b/mlprec/mld_z_diag_solver.f90 @@ -182,8 +182,8 @@ contains call psb_erractionsave(err_act) info = psb_success_ - call sv%dv%free(info) - + if (allocated(sv%dv)) call sv%dv%free(info) + if (allocated(sv%d)) then deallocate(sv%d,stat=info) if (info /= psb_success_) then