Browse Source

text-freetype2: Avoid memory leak

Doing just return could cause it to bypass the font_obj cleanup
jp9000 11 years ago
parent
commit
4ec0861481
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/text-freetype2/text-freetype2.c

+ 1 - 1
plugins/text-freetype2/text-freetype2.c

@@ -293,7 +293,7 @@ static void ft2_source_update(void *data, obs_data_t settings)
 
 	srcdata->log_mode = chat_log_mode;
 
-	if (ft2_lib == NULL) return;
+	if (ft2_lib == NULL) goto error;
 
 	if (srcdata->draw_effect == NULL) {
 		char *effect_file = NULL;