Fix multiple free of a frame (bug #6058)