fix mem leak.

pull/250/head
wurong 2022-03-28 15:03:13 +08:00 committed by Olivier Martin
parent b82be455b4
commit bdc273fe0a
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}