{"action":"opened","issue":{"url":"https://api.github.com/repos/vphpersson/http_server_labb2/issues/6","labels_url":"https://api.github.com/repos/vphpersson/http_server_labb2/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/vphpersson/http_server_labb2/issues/6/comments","events_url":"https://api.github.com/repos/vphpersson/http_server_labb2/issues/6/events","html_url":"https://github.com/vphpersson/http_server_labb2/issues/6","id":109373387,"number":6,"title":"Utebliven close(), och minnesläcka i föräldraprocessen","user":{"login":"vphpersson","id":12910623,"avatar_url":"https://avatars.githubusercontent.com/u/12910623?v=3","gravatar_id":"","url":"https://api.github.com/users/vphpersson","html_url":"https://github.com/vphpersson","followers_url":"https://api.github.com/users/vphpersson/followers","following_url":"https://api.github.com/users/vphpersson/following{/other_user}","gists_url":"https://api.github.com/users/vphpersson/gists{/gist_id}","starred_url":"https://api.github.com/users/vphpersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vphpersson/subscriptions","organizations_url":"https://api.github.com/users/vphpersson/orgs","repos_url":"https://api.github.com/users/vphpersson/repos","events_url":"https://api.github.com/users/vphpersson/events{/privacy}","received_events_url":"https://api.github.com/users/vphpersson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-01T20:07:43Z","updated_at":"2015-10-01T20:07:43Z","closed_at":null,"body":"**1.** Fildeskriptorn `sockfd` stängs inte av föräldern innan programmet avslutas.\r\n\r\n**2.** Föräldren läcker minnet från `struct addrinfo *res` via `getaddrinfo()`.\r\n\r\n Att fildeskriptorn inte stängs får inga negativa konsekvenser eftersom det tas hand om automatiskt av operativsystem(källa saknas :) ), men enligt konventioner ska programmet ta hand om det själv (källa saknas :) )\r\n\r\nMinnesläcka är så klart allvarligare. Dä programmet avbryts från loopen får vi aldrig chansen att köra `free(res)`.\r\n\r\n**Vi behöver nog en egendefinierad avbrottshanterare som tar hand om detta.**"}}