Browse Source

decklink-output-ui: Fix memory leak

Add missing bfree by changing `char *` to `BPtr<char>`.
Norihiro Kamae 3 years ago
parent
commit
288f29fa2a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      UI/frontend-plugins/decklink-output-ui/DecklinkOutputUI.cpp

+ 3 - 2
UI/frontend-plugins/decklink-output-ui/DecklinkOutputUI.cpp

@@ -86,11 +86,12 @@ void DecklinkOutputUI::SetupPreviewPropertiesView()
 
 
 void DecklinkOutputUI::SavePreviewSettings()
 void DecklinkOutputUI::SavePreviewSettings()
 {
 {
-	char *modulePath = obs_module_get_config_path(obs_current_module(), "");
+	BPtr<char> modulePath =
+		obs_module_get_config_path(obs_current_module(), "");
 
 
 	os_mkdirs(modulePath);
 	os_mkdirs(modulePath);
 
 
-	char *path = obs_module_get_config_path(
+	BPtr<char> path = obs_module_get_config_path(
 		obs_current_module(), "decklinkPreviewOutputProps.json");
 		obs_current_module(), "decklinkPreviewOutputProps.json");
 
 
 	obs_data_t *settings = previewPropertiesView->GetSettings();
 	obs_data_t *settings = previewPropertiesView->GetSettings();