Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
22dbf2bf
Commit
22dbf2bf
authored
Aug 01, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memleaks (use vlclua_dir_list_free).
parent
588723d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
modules/misc/lua/intf.c
modules/misc/lua/intf.c
+3
-0
modules/misc/lua/libs/misc.c
modules/misc/lua/libs/misc.c
+1
-0
No files found.
modules/misc/lua/intf.c
View file @
22dbf2bf
...
@@ -73,16 +73,19 @@ static char *FindFile( const char *psz_name )
...
@@ -73,16 +73,19 @@ static char *FindFile( const char *psz_name )
if
(
asprintf
(
&
psz_filename
,
"%s"
DIR_SEP
"%s.lua"
,
*
ppsz_dir
,
if
(
asprintf
(
&
psz_filename
,
"%s"
DIR_SEP
"%s.lua"
,
*
ppsz_dir
,
psz_name
)
<
0
)
psz_name
)
<
0
)
{
{
vlclua_dir_list_free
(
ppsz_dir_list
);
return
NULL
;
return
NULL
;
}
}
fp
=
fopen
(
psz_filename
,
"r"
);
fp
=
fopen
(
psz_filename
,
"r"
);
if
(
fp
)
if
(
fp
)
{
{
fclose
(
fp
);
fclose
(
fp
);
vlclua_dir_list_free
(
ppsz_dir_list
);
return
psz_filename
;
return
psz_filename
;
}
}
free
(
psz_filename
);
free
(
psz_filename
);
}
}
vlclua_dir_list_free
(
ppsz_dir_list
);
return
NULL
;
return
NULL
;
}
}
...
...
modules/misc/lua/libs/misc.c
View file @
22dbf2bf
...
@@ -162,6 +162,7 @@ static int vlclua_datadir_list( lua_State *L )
...
@@ -162,6 +162,7 @@ static int vlclua_datadir_list( lua_State *L )
lua_rawseti
(
L
,
-
2
,
i
);
lua_rawseti
(
L
,
-
2
,
i
);
i
++
;
i
++
;
}
}
vlclua_dir_list_free
(
ppsz_dir_list
);
return
1
;
return
1
;
}
}
/*****************************************************************************
/*****************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment