[vlc-commits] lua: fix memory leak

Hannes Domani git at videolan.org
Mon Aug 6 14:15:26 CEST 2018


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Mon Aug  6 14:14:17 2018 +0200| [b9cef2cce0ceb17a10af5db9fe9640e772d07dca] | committer: Jean-Baptiste Kempf

lua: fix memory leak

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 modules/lua/vlc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c
index e6419fa234..0ab951fe1d 100644
--- a/modules/lua/vlc.c
+++ b/modules/lua/vlc.c
@@ -232,6 +232,8 @@ int vlclua_dir_list(const char *luadirname, char ***restrict listp)
     /* Source Lua Scripts in architecture-independent data directory */
     if (both || libdir == NULL)
         list = vlclua_dir_list_append(list, datadir, luadirname);
+    else
+        free(datadir);
 
     *list = NULL;
     return VLC_SUCCESS;



More information about the vlc-commits mailing list