[PATCH] lua: fix memory leak
Hannes Domani
ssbssa at yahoo.de
Sun Aug 5 02:57:59 CEST 2018
---
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;
--
2.18.0
More information about the vlc-devel
mailing list