Fix Coverity CID 1108465: Use after free

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>