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
01bf3662
Commit
01bf3662
authored
Jun 11, 2015
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: fix file descriptor leak and missing error check
parent
10a55883
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_loader.cpp
+12
-2
No files found.
modules/gui/skins2/src/theme_loader.cpp
View file @
01bf3662
...
...
@@ -115,6 +115,8 @@ bool ThemeLoader::extractTarGz( const string &tarFile, const string &rootDir )
if
(
tar_open
(
&
t
,
(
char
*
)
tarFile
.
c_str
(),
O_RDONLY
)
==
-
1
)
#endif
{
msg_Dbg
(
getIntf
(),
"failed to open %s as a gzip tar file"
,
tarFile
.
c_str
()
);
return
false
;
}
...
...
@@ -139,10 +141,18 @@ bool ThemeLoader::extractZip( const string &zipFile, const string &rootDir )
// Try to open the ZIP file
unzFile
file
=
unzOpen
(
zipFile
.
c_str
()
);
if
(
file
==
0
)
{
msg_Dbg
(
getIntf
(),
"failed to open %s as a zip file"
,
zipFile
.
c_str
()
);
return
false
;
}
unz_global_info
info
;
if
(
unzGetGlobalInfo
(
file
,
&
info
)
!=
UNZ_OK
)
{
msg_Dbg
(
getIntf
(),
"failed to read zip info from %s"
,
zipFile
.
c_str
()
);
unzClose
(
file
);
return
false
;
}
// Extract all the files in the archive
...
...
@@ -159,7 +169,7 @@ bool ThemeLoader::extractZip( const string &zipFile, const string &rootDir )
if
(
i
<
info
.
number_entry
-
1
)
{
// Go the next file in the archive
if
(
unzGoToNextFile
(
file
)
!=
UNZ_OK
)
if
(
unzGoToNextFile
(
file
)
!=
UNZ_OK
)
{
msg_Warn
(
getIntf
(),
"error while unzipping %s"
,
zipFile
.
c_str
()
);
...
...
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