Browse Source

libobs: Fix possible minor memory leak

If this array reserves memory, but doesn't end up pushing any sources
back to the array, then it'd result in a memory leak.
Lain 1 year ago
parent
commit
e358244521
1 changed files with 2 additions and 1 deletions
  1. 2 1
      libobs/obs.c

+ 2 - 1
libobs/obs.c

@@ -2586,9 +2586,10 @@ obs_data_t *obs_save_source(obs_source_t *source)
 		}
 
 		obs_data_set_array(source_data, "filters", filters);
-		da_free(filters_copy);
 	}
 
+	da_free(filters_copy);
+
 	obs_data_release(settings);
 	obs_data_array_release(filters);