Fix a secure channel memory leak that appears only under high load.