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

KO Myung-Hun git at videolan.org
Sun Feb 23 15:38:39 CET 2014


vlc | branch: master | KO Myung-Hun <komh78 at gmail.com> | Fri Feb 21 12:24:47 2014 +0900| [bb3d20e76d975cd8d2c71170d11e1268e455bc91] | committer: Rémi Denis-Courmont

bin: fix SIGSEGV at exit on OS/2

--stats was added at commit c24ea5fb3af17c08ea12d94a106577d06e9f4870.
So free arguments after this.

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb3d20e76d975cd8d2c71170d11e1268e455bc91
---

 bin/vlc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;



More information about the vlc-commits mailing list