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
commit f6de26f7ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
/**