[vlc-devel] [PATCH 2/2] bin: fix SIGSEGV at exit on OS/2

KO Myung-Hun komh78 at gmail.com
Fri Feb 21 04:24:47 CET 2014


--stats was added at commit c24ea5fb3af17c08ea12d94a106577d06e9f4870.
So free arguments after this.
---
 bin/vlc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/vlc.c b/bin/vlc.c
index b0a424e..2e13334 100644
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -275,7 +275,7 @@ int main( int i_argc, const char *ppsz_argv[] )
 out:
     libvlc_release (vlc);
 #ifdef __OS2__
-    for (int i = 2; i < argc; i++)
+    for (int i = argc - i_argc; i < argc; i++)
         free (argv[i]);
 #endif
     return ret;
-- 
1.7.3.2




More information about the vlc-devel mailing list