fixed a memory leak related to https://twistedmatrix.com/trac/ticket/5487