Skip to content

Conversation

@chenbinn
Copy link

"{&sv}" format string in loop, no need free the key. see "https://developer.gnome.org/glib/stable/gvariant-format-strings.html" section "Characters: &".

@kaifastromai
Copy link

I would strongly recommend merging this commit. It fixes a really annoying 'memory freeing' bug.

@luknowak
Copy link

Hi @oliviermartin, would you be able to merge this pull request, which fixes a big memory leak, please?
It's enough to run gattlib_connect() and gattlib_disconnect() in a loop, to leak over 8MB in every iteration. Such leak makes it impossible to use the library for any long-running apps.
Thanks.

@luknowak
Copy link

There is an additional memory leak, not covered by this pull request, which needs to be fixed. When gattlib_connect() is called with adapter=NULL, and something fails in the function (e.g. device fails to connect), the default adapter is not being closed - the gattlib_adapter_close() is called only when the adapter is provided by the caller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants