Merge pull request #945 from norihiro/4.x-compat-fix-memory-leak

Events: Fix memory leak
This commit is contained in:
tt2468
2022-06-08 01:08:42 -07:00
committed by GitHub

View File

@ -610,8 +610,10 @@ void WSEvents::OnTransitionListChange() {
*/ */
void WSEvents::OnProfileChange() { void WSEvents::OnProfileChange() {
OBSDataAutoRelease fields = obs_data_create(); 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); broadcastUpdate("ProfileChanged", fields);
bfree(profile);
} }
/** /**