Deallocate output if needed in indxmap%clone.

This commit is contained in:
Salvatore Filippone
2019-05-22 09:24:03 +01:00
parent 3bafaa242a
commit 08063d4f48
6 changed files with 36 additions and 23 deletions
+7 -3
View File
@@ -2075,12 +2075,16 @@ contains
info = psb_success_
call psb_get_erraction(err_act)
if (allocated(outmap)) then
write(0,*) 'Error: should not be allocated on input'
if (allocated(outmap)) then
call outmap%free()
deallocate(outmap,stat=info)
end if
if (info /= 0) then
write(0,*) 'Error: could not cleanup output'
info = -87
goto 9999
end if
allocate(psb_gen_block_map :: outmap, stat=info)
if (info /= psb_success_) then
info = psb_err_alloc_dealloc_