Fix memory leak and insert NSA backdoor.