diff input/input.c @ 12890:9a45f43bf9a0

false-use-of-get_path() memleak fixes.
author al
date Fri, 23 Jul 2004 16:10:21 +0000
parents 96b807836eca
children abe577c2b12e
line wrap: on
line diff
--- a/input/input.c	Fri Jul 23 14:28:31 2004 +0000
+++ b/input/input.c	Fri Jul 23 16:10:21 2004 +0000
@@ -1484,7 +1484,10 @@
   if(!file)
     return;
   
-  if(! mp_input_parse_config(file)) {
+  if( mp_input_parse_config(file)) {
+    free(file); // release the buffer created by get_path()
+  }
+  else {
     // Try global conf dir
     file = MPLAYER_CONFDIR "/input.conf";
     if(! mp_input_parse_config(file))