{"action":"created","comment":{"url":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/comments/181615799","pull_request_review_id":112271615,"id":181615799,"diff_hunk":"@@ -354,7 +354,9 @@ func (ctx *Context) MakeRandomKey(encType EncType) (*KeyBlock, error) {\n // MakeChecksum generates a checksum for the input keyed by a supplied key.\n func (ctx *Context) MakeChecksum(sumType SumType, key *KeyBlock, usage int32, input []byte) (*Checksum, error) {\n \tvar cksum C.krb5_checksum\n-\tif code := C.make_checksum(ctx.ctx, C.krb5_cksumtype(sumType), key.toC(), C.krb5_keyusage(usage), bytesToKrb5DataAlias(input), &cksum); code != 0 {\n+\tckey := key.toC()\n+\tdefer C.krb5_free_keyblock_contents(ctx.ctx, &ckey)","path":"krb5.go","position":15,"original_position":15,"commit_id":"6fcba3ec1686312c9cfa568ee56e79fd0ed0e9ec","original_commit_id":"6fcba3ec1686312c9cfa568ee56e79fd0ed0e9ec","user":{"login":"davidben","id":109690,"avatar_url":"https://avatars0.githubusercontent.com/u/109690?v=4","gravatar_id":"","url":"https://api.github.com/users/davidben","html_url":"https://github.com/davidben","followers_url":"https://api.github.com/users/davidben/followers","following_url":"https://api.github.com/users/davidben/following{/other_user}","gists_url":"https://api.github.com/users/davidben/gists{/gist_id}","starred_url":"https://api.github.com/users/davidben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidben/subscriptions","organizations_url":"https://api.github.com/users/davidben/orgs","repos_url":"https://api.github.com/users/davidben/repos","events_url":"https://api.github.com/users/davidben/events{/privacy}","received_events_url":"https://api.github.com/users/davidben/received_events","type":"User","site_admin":false},"body":"This assumes that MIT Kerberos' calls libc `free`, right? I.e. the data here was allocated by `C.CBytes` and is then being freed by MIT Kerberos internally.\r\n\r\nHonestly, this assumption is pretty safe, but it's generally prudent to avoid mixing and matching allocation and cleanup like that.\r\n\r\nDitto for a lot of the other cleanup calls here.","created_at":"2018-04-16T03:35:55Z","updated_at":"2018-04-16T03:55:06Z","html_url":"https://github.com/zephyr-im/krb5-go/pull/3#discussion_r181615799","pull_request_url":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/comments/181615799"},"html":{"href":"https://github.com/zephyr-im/krb5-go/pull/3#discussion_r181615799"},"pull_request":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3","id":181730458,"html_url":"https://github.com/zephyr-im/krb5-go/pull/3","diff_url":"https://github.com/zephyr-im/krb5-go/pull/3.diff","patch_url":"https://github.com/zephyr-im/krb5-go/pull/3.patch","issue_url":"https://api.github.com/repos/zephyr-im/krb5-go/issues/3","number":3,"state":"open","locked":false,"title":"Fix cgo pointer violations for unsafeOctetPtr","user":{"login":"krawthekrow","id":7759638,"avatar_url":"https://avatars0.githubusercontent.com/u/7759638?v=4","gravatar_id":"","url":"https://api.github.com/users/krawthekrow","html_url":"https://github.com/krawthekrow","followers_url":"https://api.github.com/users/krawthekrow/followers","following_url":"https://api.github.com/users/krawthekrow/following{/other_user}","gists_url":"https://api.github.com/users/krawthekrow/gists{/gist_id}","starred_url":"https://api.github.com/users/krawthekrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krawthekrow/subscriptions","organizations_url":"https://api.github.com/users/krawthekrow/orgs","repos_url":"https://api.github.com/users/krawthekrow/repos","events_url":"https://api.github.com/users/krawthekrow/events{/privacy}","received_events_url":"https://api.github.com/users/krawthekrow/received_events","type":"User","site_admin":false},"body":"Prevents errors relating to go pointers to go pointers. Ideally a similar change should be made to unsafeCharPtr to preserve semantics, but it doesn't seem to affect anything currently so I'll defer it to when it actually causes problems (or when I have nothing better to do).","created_at":"2018-04-16T00:24:21Z","updated_at":"2018-04-16T03:55:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd6a95eb9c38e627bf768a296562001f93a9cbb3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3/commits","review_comments_url":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3/comments","review_comment_url":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zephyr-im/krb5-go/issues/3/comments","statuses_url":"https://api.github.com/repos/zephyr-im/krb5-go/statuses/6fcba3ec1686312c9cfa568ee56e79fd0ed0e9ec","head":{"label":"krawthekrow:fix-pointer-violations","ref":"fix-pointer-violations","sha":"6fcba3ec1686312c9cfa568ee56e79fd0ed0e9ec","user":{"login":"krawthekrow","id":7759638,"avatar_url":"https://avatars0.githubusercontent.com/u/7759638?v=4","gravatar_id":"","url":"https://api.github.com/users/krawthekrow","html_url":"https://github.com/krawthekrow","followers_url":"https://api.github.com/users/krawthekrow/followers","following_url":"https://api.github.com/users/krawthekrow/following{/other_user}","gists_url":"https://api.github.com/users/krawthekrow/gists{/gist_id}","starred_url":"https://api.github.com/users/krawthekrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krawthekrow/subscriptions","organizations_url":"https://api.github.com/users/krawthekrow/orgs","repos_url":"https://api.github.com/users/krawthekrow/repos","events_url":"https://api.github.com/users/krawthekrow/events{/privacy}","received_events_url":"https://api.github.com/users/krawthekrow/received_events","type":"User","site_admin":false},"repo":{"id":129654018,"name":"krb5-go","full_name":"krawthekrow/krb5-go","owner":{"login":"krawthekrow","id":7759638,"avatar_url":"https://avatars0.githubusercontent.com/u/7759638?v=4","gravatar_id":"","url":"https://api.github.com/users/krawthekrow","html_url":"https://github.com/krawthekrow","followers_url":"https://api.github.com/users/krawthekrow/followers","following_url":"https://api.github.com/users/krawthekrow/following{/other_user}","gists_url":"https://api.github.com/users/krawthekrow/gists{/gist_id}","starred_url":"https://api.github.com/users/krawthekrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krawthekrow/subscriptions","organizations_url":"https://api.github.com/users/krawthekrow/orgs","repos_url":"https://api.github.com/users/krawthekrow/repos","events_url":"https://api.github.com/users/krawthekrow/events{/privacy}","received_events_url":"https://api.github.com/users/krawthekrow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krawthekrow/krb5-go","description":"Go bindings for MIT Kerberos.","fork":true,"url":"https://api.github.com/repos/krawthekrow/krb5-go","forks_url":"https://api.github.com/repos/krawthekrow/krb5-go/forks","keys_url":"https://api.github.com/repos/krawthekrow/krb5-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krawthekrow/krb5-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krawthekrow/krb5-go/teams","hooks_url":"https://api.github.com/repos/krawthekrow/krb5-go/hooks","issue_events_url":"https://api.github.com/repos/krawthekrow/krb5-go/issues/events{/number}","events_url":"https://api.github.com/repos/krawthekrow/krb5-go/events","assignees_url":"https://api.github.com/repos/krawthekrow/krb5-go/assignees{/user}","branches_url":"https://api.github.com/repos/krawthekrow/krb5-go/branches{/branch}","tags_url":"https://api.github.com/repos/krawthekrow/krb5-go/tags","blobs_url":"https://api.github.com/repos/krawthekrow/krb5-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krawthekrow/krb5-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krawthekrow/krb5-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/krawthekrow/krb5-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krawthekrow/krb5-go/statuses/{sha}","languages_url":"https://api.github.com/repos/krawthekrow/krb5-go/languages","stargazers_url":"https://api.github.com/repos/krawthekrow/krb5-go/stargazers","contributors_url":"https://api.github.com/repos/krawthekrow/krb5-go/contributors","subscribers_url":"https://api.github.com/repos/krawthekrow/krb5-go/subscribers","subscription_url":"https://api.github.com/repos/krawthekrow/krb5-go/subscription","commits_url":"https://api.github.com/repos/krawthekrow/krb5-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/krawthekrow/krb5-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/krawthekrow/krb5-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/krawthekrow/krb5-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/krawthekrow/krb5-go/contents/{+path}","compare_url":"https://api.github.com/repos/krawthekrow/krb5-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krawthekrow/krb5-go/merges","archive_url":"https://api.github.com/repos/krawthekrow/krb5-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krawthekrow/krb5-go/downloads","issues_url":"https://api.github.com/repos/krawthekrow/krb5-go/issues{/number}","pulls_url":"https://api.github.com/repos/krawthekrow/krb5-go/pulls{/number}","milestones_url":"https://api.github.com/repos/krawthekrow/krb5-go/milestones{/number}","notifications_url":"https://api.github.com/repos/krawthekrow/krb5-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krawthekrow/krb5-go/labels{/name}","releases_url":"https://api.github.com/repos/krawthekrow/krb5-go/releases{/id}","deployments_url":"https://api.github.com/repos/krawthekrow/krb5-go/deployments","created_at":"2018-04-15T21:51:03Z","updated_at":"2018-04-15T21:51:05Z","pushed_at":"2018-04-15T21:53:43Z","git_url":"git://github.com/krawthekrow/krb5-go.git","ssh_url":"git@github.com:krawthekrow/krb5-go.git","clone_url":"https://github.com/krawthekrow/krb5-go.git","svn_url":"https://github.com/krawthekrow/krb5-go","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zephyr-im:master","ref":"master","sha":"b47f41ca047d8cf38241852dfe2e7ec145607984","user":{"login":"zephyr-im","id":6565297,"avatar_url":"https://avatars3.githubusercontent.com/u/6565297?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyr-im","html_url":"https://github.com/zephyr-im","followers_url":"https://api.github.com/users/zephyr-im/followers","following_url":"https://api.github.com/users/zephyr-im/following{/other_user}","gists_url":"https://api.github.com/users/zephyr-im/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyr-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyr-im/subscriptions","organizations_url":"https://api.github.com/users/zephyr-im/orgs","repos_url":"https://api.github.com/users/zephyr-im/repos","events_url":"https://api.github.com/users/zephyr-im/events{/privacy}","received_events_url":"https://api.github.com/users/zephyr-im/received_events","type":"Organization","site_admin":false},"repo":{"id":27654730,"name":"krb5-go","full_name":"zephyr-im/krb5-go","owner":{"login":"zephyr-im","id":6565297,"avatar_url":"https://avatars3.githubusercontent.com/u/6565297?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyr-im","html_url":"https://github.com/zephyr-im","followers_url":"https://api.github.com/users/zephyr-im/followers","following_url":"https://api.github.com/users/zephyr-im/following{/other_user}","gists_url":"https://api.github.com/users/zephyr-im/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyr-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyr-im/subscriptions","organizations_url":"https://api.github.com/users/zephyr-im/orgs","repos_url":"https://api.github.com/users/zephyr-im/repos","events_url":"https://api.github.com/users/zephyr-im/events{/privacy}","received_events_url":"https://api.github.com/users/zephyr-im/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zephyr-im/krb5-go","description":"Go bindings for MIT Kerberos.","fork":false,"url":"https://api.github.com/repos/zephyr-im/krb5-go","forks_url":"https://api.github.com/repos/zephyr-im/krb5-go/forks","keys_url":"https://api.github.com/repos/zephyr-im/krb5-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zephyr-im/krb5-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zephyr-im/krb5-go/teams","hooks_url":"https://api.github.com/repos/zephyr-im/krb5-go/hooks","issue_events_url":"https://api.github.com/repos/zephyr-im/krb5-go/issues/events{/number}","events_url":"https://api.github.com/repos/zephyr-im/krb5-go/events","assignees_url":"https://api.github.com/repos/zephyr-im/krb5-go/assignees{/user}","branches_url":"https://api.github.com/repos/zephyr-im/krb5-go/branches{/branch}","tags_url":"https://api.github.com/repos/zephyr-im/krb5-go/tags","blobs_url":"https://api.github.com/repos/zephyr-im/krb5-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zephyr-im/krb5-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zephyr-im/krb5-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/zephyr-im/krb5-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zephyr-im/krb5-go/statuses/{sha}","languages_url":"https://api.github.com/repos/zephyr-im/krb5-go/languages","stargazers_url":"https://api.github.com/repos/zephyr-im/krb5-go/stargazers","contributors_url":"https://api.github.com/repos/zephyr-im/krb5-go/contributors","subscribers_url":"https://api.github.com/repos/zephyr-im/krb5-go/subscribers","subscription_url":"https://api.github.com/repos/zephyr-im/krb5-go/subscription","commits_url":"https://api.github.com/repos/zephyr-im/krb5-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/zephyr-im/krb5-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/zephyr-im/krb5-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/zephyr-im/krb5-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/zephyr-im/krb5-go/contents/{+path}","compare_url":"https://api.github.com/repos/zephyr-im/krb5-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zephyr-im/krb5-go/merges","archive_url":"https://api.github.com/repos/zephyr-im/krb5-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zephyr-im/krb5-go/downloads","issues_url":"https://api.github.com/repos/zephyr-im/krb5-go/issues{/number}","pulls_url":"https://api.github.com/repos/zephyr-im/krb5-go/pulls{/number}","milestones_url":"https://api.github.com/repos/zephyr-im/krb5-go/milestones{/number}","notifications_url":"https://api.github.com/repos/zephyr-im/krb5-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zephyr-im/krb5-go/labels{/name}","releases_url":"https://api.github.com/repos/zephyr-im/krb5-go/releases{/id}","deployments_url":"https://api.github.com/repos/zephyr-im/krb5-go/deployments","created_at":"2014-12-07T00:52:45Z","updated_at":"2017-07-31T21:18:53Z","pushed_at":"2018-04-16T00:24:22Z","git_url":"git://github.com/zephyr-im/krb5-go.git","ssh_url":"git@github.com:zephyr-im/krb5-go.git","clone_url":"https://github.com/zephyr-im/krb5-go.git","svn_url":"https://github.com/zephyr-im/krb5-go","homepage":null,"size":29,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3"},"html":{"href":"https://github.com/zephyr-im/krb5-go/pull/3"},"issue":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/issues/3"},"comments":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/zephyr-im/krb5-go/statuses/6fcba3ec1686312c9cfa568ee56e79fd0ed0e9ec"}},"author_association":"NONE"}}
{"actor":{"display_login":"davidben"}}