Skip to content

Commit

Permalink
Properly release cancellable object on cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Oct 24, 2022
1 parent 0a6b18e commit 1f9c43c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/platform/Linux/bluez/Helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,11 @@ void EndpointCleanup(BluezEndpoint * apEndpoint)
g_free(apEndpoint->mpPeerDevicePath);
apEndpoint->mpPeerDevicePath = nullptr;
}
g_free(apEndpoint->mpConnectCancellable);
if (apEndpoint->mpConnectCancellable != nullptr)
{
g_object_unref(apEndpoint->mpConnectCancellable);
apEndpoint->mpConnectCancellable = nullptr;
}
g_free(apEndpoint);
}
}
Expand Down

0 comments on commit 1f9c43c

Please sign in to comment.