{"action":"created","comment":{"url":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments/45952837","id":45952837,"diff_hunk":"@@ -47,7 +160,7 @@ public static void InstallService(string servicePath, string serviceName, string\n \n                     ServiceDescription descriptionStruct = new ServiceDescription\n                     {\n-                        lpDescription = serviceDescription\n+                        lpDescription = lpDescription\n                     };\n \n                     IntPtr lpInfo = Marshal.AllocHGlobal(Marshal.SizeOf(descriptionStruct));","path":"src/AdvApi32.Desktop/AdvApi32.Helpers.cs","position":167,"original_position":167,"commit_id":"4e6474f7ebb1aa3bc3d1932fdc1b31ceac93546b","original_commit_id":"4e6474f7ebb1aa3bc3d1932fdc1b31ceac93546b","user":{"login":"vbfox","id":131878,"avatar_url":"https://avatars.githubusercontent.com/u/131878?v=3","gravatar_id":"","url":"https://api.github.com/users/vbfox","html_url":"https://github.com/vbfox","followers_url":"https://api.github.com/users/vbfox/followers","following_url":"https://api.github.com/users/vbfox/following{/other_user}","gists_url":"https://api.github.com/users/vbfox/gists{/gist_id}","starred_url":"https://api.github.com/users/vbfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbfox/subscriptions","organizations_url":"https://api.github.com/users/vbfox/orgs","repos_url":"https://api.github.com/users/vbfox/repos","events_url":"https://api.github.com/users/vbfox/events{/privacy}","received_events_url":"https://api.github.com/users/vbfox/received_events","type":"User","site_admin":false},"body":"(I know this code wasn't changed in this review but it might be interesting to fix this while you are in the file, otherwise no problem we'll create an issue and fix it later)\r\n\r\nThe code under that line is actually not really good :\r\n* `AllocHGlobal` result is tested for null but there is no indication that it could ever happen\r\n* Memory isn't always freed In case of exception raised by one of the P/Invoke, the `FreeHGlobal` should be in a `finally` block","created_at":"2015-11-26T08:26:46Z","updated_at":"2015-11-26T08:26:46Z","html_url":"https://github.com/AArnott/pinvoke/pull/79#discussion_r45952837","pull_request_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments/45952837"},"html":{"href":"https://github.com/AArnott/pinvoke/pull/79#discussion_r45952837"},"pull_request":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/AArnott/pinvoke/pulls/79","id":51870023,"html_url":"https://github.com/AArnott/pinvoke/pull/79","diff_url":"https://github.com/AArnott/pinvoke/pull/79.diff","patch_url":"https://github.com/AArnott/pinvoke/pull/79.patch","issue_url":"https://api.github.com/repos/AArnott/pinvoke/issues/79","number":79,"state":"open","locked":false,"title":"Related with #71","user":{"login":"jmelosegui","id":450246,"avatar_url":"https://avatars.githubusercontent.com/u/450246?v=3","gravatar_id":"","url":"https://api.github.com/users/jmelosegui","html_url":"https://github.com/jmelosegui","followers_url":"https://api.github.com/users/jmelosegui/followers","following_url":"https://api.github.com/users/jmelosegui/following{/other_user}","gists_url":"https://api.github.com/users/jmelosegui/gists{/gist_id}","starred_url":"https://api.github.com/users/jmelosegui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmelosegui/subscriptions","organizations_url":"https://api.github.com/users/jmelosegui/orgs","repos_url":"https://api.github.com/users/jmelosegui/repos","events_url":"https://api.github.com/users/jmelosegui/events{/privacy}","received_events_url":"https://api.github.com/users/jmelosegui/received_events","type":"User","site_admin":false},"body":" * Complying with the conventions for helper methods\r\n * Added new helper method","created_at":"2015-11-26T03:46:04Z","updated_at":"2015-11-26T08:26:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78edfb2e9a19e77c7c2823cb297955e7966d183f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/79/commits","review_comments_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/79/comments","review_comment_url":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AArnott/pinvoke/issues/79/comments","statuses_url":"https://api.github.com/repos/AArnott/pinvoke/statuses/4e6474f7ebb1aa3bc3d1932fdc1b31ceac93546b","head":{"label":"jmelosegui:AdvApi_Helpers","ref":"AdvApi_Helpers","sha":"4e6474f7ebb1aa3bc3d1932fdc1b31ceac93546b","user":{"login":"jmelosegui","id":450246,"avatar_url":"https://avatars.githubusercontent.com/u/450246?v=3","gravatar_id":"","url":"https://api.github.com/users/jmelosegui","html_url":"https://github.com/jmelosegui","followers_url":"https://api.github.com/users/jmelosegui/followers","following_url":"https://api.github.com/users/jmelosegui/following{/other_user}","gists_url":"https://api.github.com/users/jmelosegui/gists{/gist_id}","starred_url":"https://api.github.com/users/jmelosegui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmelosegui/subscriptions","organizations_url":"https://api.github.com/users/jmelosegui/orgs","repos_url":"https://api.github.com/users/jmelosegui/repos","events_url":"https://api.github.com/users/jmelosegui/events{/privacy}","received_events_url":"https://api.github.com/users/jmelosegui/received_events","type":"User","site_admin":false},"repo":{"id":45110499,"name":"pinvoke","full_name":"jmelosegui/pinvoke","owner":{"login":"jmelosegui","id":450246,"avatar_url":"https://avatars.githubusercontent.com/u/450246?v=3","gravatar_id":"","url":"https://api.github.com/users/jmelosegui","html_url":"https://github.com/jmelosegui","followers_url":"https://api.github.com/users/jmelosegui/followers","following_url":"https://api.github.com/users/jmelosegui/following{/other_user}","gists_url":"https://api.github.com/users/jmelosegui/gists{/gist_id}","starred_url":"https://api.github.com/users/jmelosegui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmelosegui/subscriptions","organizations_url":"https://api.github.com/users/jmelosegui/orgs","repos_url":"https://api.github.com/users/jmelosegui/repos","events_url":"https://api.github.com/users/jmelosegui/events{/privacy}","received_events_url":"https://api.github.com/users/jmelosegui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmelosegui/pinvoke","description":"A library containing all PInvoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.","fork":true,"url":"https://api.github.com/repos/jmelosegui/pinvoke","forks_url":"https://api.github.com/repos/jmelosegui/pinvoke/forks","keys_url":"https://api.github.com/repos/jmelosegui/pinvoke/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmelosegui/pinvoke/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmelosegui/pinvoke/teams","hooks_url":"https://api.github.com/repos/jmelosegui/pinvoke/hooks","issue_events_url":"https://api.github.com/repos/jmelosegui/pinvoke/issues/events{/number}","events_url":"https://api.github.com/repos/jmelosegui/pinvoke/events","assignees_url":"https://api.github.com/repos/jmelosegui/pinvoke/assignees{/user}","branches_url":"https://api.github.com/repos/jmelosegui/pinvoke/branches{/branch}","tags_url":"https://api.github.com/repos/jmelosegui/pinvoke/tags","blobs_url":"https://api.github.com/repos/jmelosegui/pinvoke/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmelosegui/pinvoke/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmelosegui/pinvoke/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmelosegui/pinvoke/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmelosegui/pinvoke/statuses/{sha}","languages_url":"https://api.github.com/repos/jmelosegui/pinvoke/languages","stargazers_url":"https://api.github.com/repos/jmelosegui/pinvoke/stargazers","contributors_url":"https://api.github.com/repos/jmelosegui/pinvoke/contributors","subscribers_url":"https://api.github.com/repos/jmelosegui/pinvoke/subscribers","subscription_url":"https://api.github.com/repos/jmelosegui/pinvoke/subscription","commits_url":"https://api.github.com/repos/jmelosegui/pinvoke/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmelosegui/pinvoke/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmelosegui/pinvoke/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmelosegui/pinvoke/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmelosegui/pinvoke/contents/{+path}","compare_url":"https://api.github.com/repos/jmelosegui/pinvoke/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmelosegui/pinvoke/merges","archive_url":"https://api.github.com/repos/jmelosegui/pinvoke/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmelosegui/pinvoke/downloads","issues_url":"https://api.github.com/repos/jmelosegui/pinvoke/issues{/number}","pulls_url":"https://api.github.com/repos/jmelosegui/pinvoke/pulls{/number}","milestones_url":"https://api.github.com/repos/jmelosegui/pinvoke/milestones{/number}","notifications_url":"https://api.github.com/repos/jmelosegui/pinvoke/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmelosegui/pinvoke/labels{/name}","releases_url":"https://api.github.com/repos/jmelosegui/pinvoke/releases{/id}","created_at":"2015-10-28T12:22:39Z","updated_at":"2015-10-28T12:22:40Z","pushed_at":"2015-11-26T03:53:46Z","git_url":"git://github.com/jmelosegui/pinvoke.git","ssh_url":"git@github.com:jmelosegui/pinvoke.git","clone_url":"https://github.com/jmelosegui/pinvoke.git","svn_url":"https://github.com/jmelosegui/pinvoke","homepage":null,"size":801,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AArnott:master","ref":"master","sha":"32da901705474f5219e9946e661a4b6c2b42ab3c","user":{"login":"AArnott","id":3548,"avatar_url":"https://avatars.githubusercontent.com/u/3548?v=3","gravatar_id":"","url":"https://api.github.com/users/AArnott","html_url":"https://github.com/AArnott","followers_url":"https://api.github.com/users/AArnott/followers","following_url":"https://api.github.com/users/AArnott/following{/other_user}","gists_url":"https://api.github.com/users/AArnott/gists{/gist_id}","starred_url":"https://api.github.com/users/AArnott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AArnott/subscriptions","organizations_url":"https://api.github.com/users/AArnott/orgs","repos_url":"https://api.github.com/users/AArnott/repos","events_url":"https://api.github.com/users/AArnott/events{/privacy}","received_events_url":"https://api.github.com/users/AArnott/received_events","type":"User","site_admin":false},"repo":{"id":44758360,"name":"pinvoke","full_name":"AArnott/pinvoke","owner":{"login":"AArnott","id":3548,"avatar_url":"https://avatars.githubusercontent.com/u/3548?v=3","gravatar_id":"","url":"https://api.github.com/users/AArnott","html_url":"https://github.com/AArnott","followers_url":"https://api.github.com/users/AArnott/followers","following_url":"https://api.github.com/users/AArnott/following{/other_user}","gists_url":"https://api.github.com/users/AArnott/gists{/gist_id}","starred_url":"https://api.github.com/users/AArnott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AArnott/subscriptions","organizations_url":"https://api.github.com/users/AArnott/orgs","repos_url":"https://api.github.com/users/AArnott/repos","events_url":"https://api.github.com/users/AArnott/events{/privacy}","received_events_url":"https://api.github.com/users/AArnott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AArnott/pinvoke","description":"A library containing all PInvoke code so you don't have to import it every time. Maintained and updated to support the latest Windows OS.","fork":false,"url":"https://api.github.com/repos/AArnott/pinvoke","forks_url":"https://api.github.com/repos/AArnott/pinvoke/forks","keys_url":"https://api.github.com/repos/AArnott/pinvoke/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AArnott/pinvoke/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AArnott/pinvoke/teams","hooks_url":"https://api.github.com/repos/AArnott/pinvoke/hooks","issue_events_url":"https://api.github.com/repos/AArnott/pinvoke/issues/events{/number}","events_url":"https://api.github.com/repos/AArnott/pinvoke/events","assignees_url":"https://api.github.com/repos/AArnott/pinvoke/assignees{/user}","branches_url":"https://api.github.com/repos/AArnott/pinvoke/branches{/branch}","tags_url":"https://api.github.com/repos/AArnott/pinvoke/tags","blobs_url":"https://api.github.com/repos/AArnott/pinvoke/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AArnott/pinvoke/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AArnott/pinvoke/git/refs{/sha}","trees_url":"https://api.github.com/repos/AArnott/pinvoke/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AArnott/pinvoke/statuses/{sha}","languages_url":"https://api.github.com/repos/AArnott/pinvoke/languages","stargazers_url":"https://api.github.com/repos/AArnott/pinvoke/stargazers","contributors_url":"https://api.github.com/repos/AArnott/pinvoke/contributors","subscribers_url":"https://api.github.com/repos/AArnott/pinvoke/subscribers","subscription_url":"https://api.github.com/repos/AArnott/pinvoke/subscription","commits_url":"https://api.github.com/repos/AArnott/pinvoke/commits{/sha}","git_commits_url":"https://api.github.com/repos/AArnott/pinvoke/git/commits{/sha}","comments_url":"https://api.github.com/repos/AArnott/pinvoke/comments{/number}","issue_comment_url":"https://api.github.com/repos/AArnott/pinvoke/issues/comments{/number}","contents_url":"https://api.github.com/repos/AArnott/pinvoke/contents/{+path}","compare_url":"https://api.github.com/repos/AArnott/pinvoke/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AArnott/pinvoke/merges","archive_url":"https://api.github.com/repos/AArnott/pinvoke/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AArnott/pinvoke/downloads","issues_url":"https://api.github.com/repos/AArnott/pinvoke/issues{/number}","pulls_url":"https://api.github.com/repos/AArnott/pinvoke/pulls{/number}","milestones_url":"https://api.github.com/repos/AArnott/pinvoke/milestones{/number}","notifications_url":"https://api.github.com/repos/AArnott/pinvoke/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AArnott/pinvoke/labels{/name}","releases_url":"https://api.github.com/repos/AArnott/pinvoke/releases{/id}","created_at":"2015-10-22T16:28:01Z","updated_at":"2015-11-24T21:01:47Z","pushed_at":"2015-11-26T06:37:54Z","git_url":"git://github.com/AArnott/pinvoke.git","ssh_url":"git@github.com:AArnott/pinvoke.git","clone_url":"https://github.com/AArnott/pinvoke.git","svn_url":"https://github.com/AArnott/pinvoke","homepage":null,"size":1028,"stargazers_count":19,"watchers_count":19,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":11,"forks":6,"open_issues":11,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/79"},"html":{"href":"https://github.com/AArnott/pinvoke/pull/79"},"issue":{"href":"https://api.github.com/repos/AArnott/pinvoke/issues/79"},"comments":{"href":"https://api.github.com/repos/AArnott/pinvoke/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AArnott/pinvoke/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/AArnott/pinvoke/statuses/4e6474f7ebb1aa3bc3d1932fdc1b31ceac93546b"}}}}