Fix another use after free
Coverity CID 1034471