mirror of https://github.com/labapart/gattlib
parent
d2702050ec
commit
00cbc1ab87
|
@ -62,6 +62,7 @@ static gpointer _gattlib_discovered_device_thread(gpointer data) {
|
||||||
free(args->mac_address);
|
free(args->mac_address);
|
||||||
if (args->name != NULL) {
|
if (args->name != NULL) {
|
||||||
free(args->name);
|
free(args->name);
|
||||||
|
args->name = NULL;
|
||||||
}
|
}
|
||||||
free(args);
|
free(args);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -61,9 +61,11 @@ void gattlib_notification_device_thread(gpointer data, gpointer user_data) {
|
||||||
|
|
||||||
if (args->uuid != NULL) {
|
if (args->uuid != NULL) {
|
||||||
free(args->uuid);
|
free(args->uuid);
|
||||||
|
args->uuid = NULL;
|
||||||
}
|
}
|
||||||
if (args->data != NULL) {
|
if (args->data != NULL) {
|
||||||
free(args->data);
|
free(args->data);
|
||||||
|
args->data = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,7 @@ void gattlib_handler_free(struct gattlib_handler* handler) {
|
||||||
Py_DECREF(args->args);
|
Py_DECREF(args->args);
|
||||||
handler->python_args = NULL;
|
handler->python_args = NULL;
|
||||||
free(handler->python_args);
|
free(handler->python_args);
|
||||||
|
handler->python_args = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handler->thread_pool != NULL) {
|
if (handler->thread_pool != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue