mirror of https://github.com/labapart/gattlib
fix mem leak.
parent
b82be455b4
commit
bdc273fe0a
|
@ -225,6 +225,13 @@ FREE_CONNECTION:
|
|||
|
||||
FREE_CONN_CONTEXT:
|
||||
free(conn_context);
|
||||
|
||||
// destroy default adapter
|
||||
if(adapter == NULL)
|
||||
{
|
||||
gattlib_adapter_close(gattlib_adapter);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue