Browse Source

UI: Fix memory leak when dropping files

This fixes a memory leak when dropping files when the name
is the same as other sources.
Clayton Groeneveld 5 years ago
parent
commit
fd0872d630
1 changed files with 3 additions and 0 deletions
  1. 3 0
      UI/window-basic-main-dropfiles.cpp

+ 3 - 0
UI/window-basic-main-dropfiles.cpp

@@ -51,8 +51,11 @@ static string GenerateSourceName(const char *base)
 		}
 
 		obs_source_t *source = obs_get_source_by_name(name.c_str());
+
 		if (!source)
 			return name;
+		else
+			obs_source_release(source);
 	}
 }