]> git.sesse.net Git - vlc/commitdiff
Fix the problem to free an invalid memory object.
authorKO Myung-Hun <komh@chollian.net>
Mon, 10 Oct 2011 11:44:10 +0000 (20:44 +0900)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 10 Oct 2011 14:25:24 +0000 (17:25 +0300)
The first element allocated by FromLocale() is argv[2] not argv[1].

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
bin/vlc.c

index ee30bd419659302280c6b3891015d245f2690a05..11d09b278d61291ba1be0c7ed9eb8b28c317871f 100644 (file)
--- a/bin/vlc.c
+++ b/bin/vlc.c
@@ -247,7 +247,7 @@ int main( int i_argc, const char *ppsz_argv[] )
 out:
     if (vlc != NULL)
         libvlc_release (vlc);
-    for (int i = 1; i < argc; i++)
+    for (int i = 2; i < argc; i++)
         LocaleFree (argv[i]);
 
     return 0;