From 7ea9b16b37ce38893a67003acf2bfe0341dae517 Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Tue, 31 May 2022 01:03:05 +0900 Subject: [PATCH] Events: Fix memory leak `bfree` was missing after calling `obs_frontend_get_current_profile()`. --- src/WSEvents.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WSEvents.cpp b/src/WSEvents.cpp index 69a45037..f96019de 100644 --- a/src/WSEvents.cpp +++ b/src/WSEvents.cpp @@ -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); } /**