Fixed some leaks in authenticationHeaders and http_get_proxy