{"action":"created","issue":{"url":"https://api.github.com/repos/apache/trafficserver/issues/366","labels_url":"https://api.github.com/repos/apache/trafficserver/issues/366/labels{/name}","comments_url":"https://api.github.com/repos/apache/trafficserver/issues/366/comments","events_url":"https://api.github.com/repos/apache/trafficserver/issues/366/events","html_url":"https://github.com/apache/trafficserver/pull/366","id":120789945,"number":366,"title":"remove alloc_cache from NetAccept","user":{"login":"oknet","id":5242289,"avatar_url":"https://avatars.githubusercontent.com/u/5242289?v=3","gravatar_id":"","url":"https://api.github.com/users/oknet","html_url":"https://github.com/oknet","followers_url":"https://api.github.com/users/oknet/followers","following_url":"https://api.github.com/users/oknet/following{/other_user}","gists_url":"https://api.github.com/users/oknet/gists{/gist_id}","starred_url":"https://api.github.com/users/oknet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oknet/subscriptions","organizations_url":"https://api.github.com/users/oknet/orgs","repos_url":"https://api.github.com/users/oknet/repos","events_url":"https://api.github.com/users/oknet/events{/privacy}","received_events_url":"https://api.github.com/users/oknet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-07T14:51:02Z","updated_at":"2015-12-08T07:51:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/trafficserver/pulls/366","html_url":"https://github.com/apache/trafficserver/pull/366","diff_url":"https://github.com/apache/trafficserver/pull/366.diff","patch_url":"https://github.com/apache/trafficserver/pull/366.patch"},"body":"remove alloc_cache from NetAccept & net_accept() to avoid mem leak on ~NetAccept().\r\nadd a condition check for vc==NULL follow allocate_vc()."},"comment":{"url":"https://api.github.com/repos/apache/trafficserver/issues/comments/162803942","html_url":"https://github.com/apache/trafficserver/pull/366#issuecomment-162803942","issue_url":"https://api.github.com/repos/apache/trafficserver/issues/366","id":162803942,"user":{"login":"oknet","id":5242289,"avatar_url":"https://avatars.githubusercontent.com/u/5242289?v=3","gravatar_id":"","url":"https://api.github.com/users/oknet","html_url":"https://github.com/oknet","followers_url":"https://api.github.com/users/oknet/followers","following_url":"https://api.github.com/users/oknet/following{/other_user}","gists_url":"https://api.github.com/users/oknet/gists{/gist_id}","starred_url":"https://api.github.com/users/oknet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oknet/subscriptions","organizations_url":"https://api.github.com/users/oknet/orgs","repos_url":"https://api.github.com/users/oknet/repos","events_url":"https://api.github.com/users/oknet/events{/privacy}","received_events_url":"https://api.github.com/users/oknet/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T07:51:28Z","updated_at":"2015-12-08T07:51:28Z","body":"Answers：\r\n1. to implement an one shot accept (like a ftp pasv mode)\r\n2. accept_fn = net_accept, accept_fn is called from NetAccept\r\n3. the alloc_cache point to a vc, the vc may be a UnixNetVConnection, sslNetVConnection, or others ...\r\nshould dealloc it by netAllocate.free(), sslNetAllocate.free() ...\r\nIt is hardly to get the vc's type inside the destructor of NetAccept."}}