{"action":"created","issue":{"url":"https://api.github.com/repos/Yubico/libu2f-host/issues/41","labels_url":"https://api.github.com/repos/Yubico/libu2f-host/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/Yubico/libu2f-host/issues/41/comments","events_url":"https://api.github.com/repos/Yubico/libu2f-host/issues/41/events","html_url":"https://github.com/Yubico/libu2f-host/issues/41","id":119510382,"number":41,"title":"Requesting an exportable function, equivalent of \"free\", for data returned in response to u2fh_register/authenticate functions","user":{"login":"marianpascalau","id":16084322,"avatar_url":"https://avatars.githubusercontent.com/u/16084322?v=3","gravatar_id":"","url":"https://api.github.com/users/marianpascalau","html_url":"https://github.com/marianpascalau","followers_url":"https://api.github.com/users/marianpascalau/followers","following_url":"https://api.github.com/users/marianpascalau/following{/other_user}","gists_url":"https://api.github.com/users/marianpascalau/gists{/gist_id}","starred_url":"https://api.github.com/users/marianpascalau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marianpascalau/subscriptions","organizations_url":"https://api.github.com/users/marianpascalau/orgs","repos_url":"https://api.github.com/users/marianpascalau/repos","events_url":"https://api.github.com/users/marianpascalau/events{/privacy}","received_events_url":"https://api.github.com/users/marianpascalau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-30T15:05:14Z","updated_at":"2015-12-01T08:24:17Z","closed_at":null,"body":"Hi there,\r\nIs there a reason why there is no function exported by your shared library to free the results allocated by u2fh_register and u2fh_authenticate functions? \r\n\r\nAs example, I have managed to compile this program for Windows, I have written a DLL Wrapper, but I have no equivalent in .Net to release the responses in managed code (malloc/strdup pointers) . In Windows there is an API to allocate special buffers but your library is using only C-runtime calls.\r\n\r\nIs it possible that you make the \"free\" function exportable or change the way you allocate these pointers? \r\n\r\nMy proposal is to add an extra exportable function:\r\nvoid u2fh_free_data(void* data) {\r\n    free(data);\r\n}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Yubico/libu2f-host/issues/comments/160892222","html_url":"https://github.com/Yubico/libu2f-host/issues/41#issuecomment-160892222","issue_url":"https://api.github.com/repos/Yubico/libu2f-host/issues/41","id":160892222,"user":{"login":"klali","id":264413,"avatar_url":"https://avatars.githubusercontent.com/u/264413?v=3","gravatar_id":"","url":"https://api.github.com/users/klali","html_url":"https://github.com/klali","followers_url":"https://api.github.com/users/klali/followers","following_url":"https://api.github.com/users/klali/following{/other_user}","gists_url":"https://api.github.com/users/klali/gists{/gist_id}","starred_url":"https://api.github.com/users/klali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klali/subscriptions","organizations_url":"https://api.github.com/users/klali/orgs","repos_url":"https://api.github.com/users/klali/repos","events_url":"https://api.github.com/users/klali/events{/privacy}","received_events_url":"https://api.github.com/users/klali/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T08:24:17Z","updated_at":"2015-12-01T08:24:17Z","body":"I'm thinking that it would make more sense to provide (new) functions where you pass in already allocated buffers to be filled rather than giving out allocated memory.. opinions?"}}