Skip to content

Commit 1589518

Browse files
author
J. Scott Berg
committed
setcavities: fix exit path failing to deallocate
1 parent 9e45b82 commit 1589518

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/madx_ptc_setcavs.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ subroutine setcavities(my_ring, maxaccel)
7777
call locate_all_twcav(my_ring,poscav)
7878
if ( getdebug() > 2 ) write(6,*) "There are ", size(poscav), " Cavities in the line."
7979
if ( size(poscav) == 0) then
80+
deallocate(poscav)
8081
if (getdebug() > 1) then
8182
close(mf1);close(mf2);
8283
endif

0 commit comments

Comments
 (0)