Events: Fix memory leak

`bfree` was missing after calling `obs_frontend_get_current_profile()`.
This commit is contained in:
Norihiro Kamae 2022-05-31 01:03:05 +09:00
parent ff6b774687
commit 7ea9b16b37

View File

@ -610,8 +610,10 @@ void WSEvents::OnTransitionListChange() {
*/
void WSEvents::OnProfileChange() {
OBSDataAutoRelease fields = obs_data_create();
obs_data_set_string(fields, "profile", obs_frontend_get_current_profile());
char *profile = obs_frontend_get_current_profile();
obs_data_set_string(fields, "profile", profile);
broadcastUpdate("ProfileChanged", fields);
bfree(profile);
}
/**