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