Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
06402f46
Commit
06402f46
authored
Jul 07, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
directory: fix double closedir()
parent
4a37004b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
modules/access/directory.c
modules/access/directory.c
+6
-9
No files found.
modules/access/directory.c
View file @
06402f46
...
...
@@ -203,14 +203,10 @@ static int directory_open (directory *p_dir, char *psz_entry, DIR **handle)
static
bool
directory_push
(
access_sys_t
*
p_sys
,
DIR
*
handle
,
char
*
psz_uri
)
{
directory
*
p_dir
;
p_dir
=
malloc
(
sizeof
(
*
p_dir
));
if
(
unlikely
(
p_dir
==
NULL
))
return
NULL
;
directory
*
p_dir
=
malloc
(
sizeof
(
*
p_dir
));
psz_uri
=
strdup
(
psz_uri
);
if
(
unlikely
(
psz_uri
==
NULL
))
if
(
unlikely
(
p
_dir
==
NULL
||
p
sz_uri
==
NULL
))
goto
error
;
p_dir
->
parent
=
p_sys
->
current
;
...
...
@@ -236,11 +232,10 @@ static bool directory_push (access_sys_t *p_sys, DIR *handle, char *psz_uri)
p_sys
->
current
=
p_dir
;
return
true
;
error:
error:
closedir
(
handle
);
free
(
p_dir
);
free
(
psz_uri
);
return
false
;
}
...
...
@@ -307,7 +302,10 @@ int DirInit (access_t *p_access, DIR *handle)
else
uri
=
vlc_path2uri
(
p_access
->
psz_filepath
,
"file"
);
if
(
unlikely
(
uri
==
NULL
))
{
closedir
(
handle
);
goto
error
;
}
/* "Open" the base directory */
p_sys
->
current
=
NULL
;
...
...
@@ -338,7 +336,6 @@ int DirInit (access_t *p_access, DIR *handle)
return
VLC_SUCCESS
;
error:
closedir
(
handle
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
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