[vlc-commits] Fix the problem to free an invalid memory object.

KO Myung-Hun git at videolan.org
Mon Oct 10 16:29:37 CEST 2011


vlc | branch: master | KO Myung-Hun <komh at chollian.net> | Mon Oct 10 20:44:10 2011 +0900| [4b5c54ec9f435e6e34331f7dd83697ee6a998932] | committer: Rémi Denis-Courmont

Fix the problem to free an invalid memory object.

The first element allocated by FromLocale() is argv[2] not argv[1].

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

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

 bin/vlc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/vlc.c b/bin/vlc.c
index ee30bd4..11d09b2 100644
--- 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;



More information about the vlc-commits mailing list