Fix potential leak in HttpContentEncoder