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
4f25e7fd
Commit
4f25e7fd
authored
Feb 07, 2015
by
Hannes Domani
Committed by
Jean-Baptiste Kempf
Feb 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access: rar: fix memory leaks of unused naming scheme
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
6344d9bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
modules/access/rar/access.c
modules/access/rar/access.c
+8
-0
No files found.
modules/access/rar/access.c
View file @
4f25e7fd
...
...
@@ -174,12 +174,16 @@ int RarAccessOpen(vlc_object_t *object)
if
(
oldscheme
.
filescount
>=
newscheme
.
filescount
&&
oldscheme
.
i_nbvols
>
newscheme
.
i_nbvols
)
{
for
(
int
i
=
0
;
i
<
newscheme
.
filescount
;
i
++
)
RarFileDelete
(
newscheme
.
files
[
i
]);
free
(
newscheme
.
files
);
p_scheme
=
&
oldscheme
;
msg_Dbg
(
s
,
"using rar old naming for %d files nbvols %u"
,
p_scheme
->
filescount
,
oldscheme
.
i_nbvols
);
}
else
if
(
newscheme
.
filescount
)
{
for
(
int
i
=
0
;
i
<
oldscheme
.
filescount
;
i
++
)
RarFileDelete
(
oldscheme
.
files
[
i
]);
free
(
oldscheme
.
files
);
p_scheme
=
&
newscheme
;
msg_Dbg
(
s
,
"using rar new naming for %d files nbvols %u"
,
p_scheme
->
filescount
,
oldscheme
.
i_nbvols
);
...
...
@@ -187,7 +191,11 @@ int RarAccessOpen(vlc_object_t *object)
else
{
msg_Info
(
s
,
"Invalid or unsupported RAR archive"
);
for
(
int
i
=
0
;
i
<
oldscheme
.
filescount
;
i
++
)
RarFileDelete
(
oldscheme
.
files
[
i
]);
free
(
oldscheme
.
files
);
for
(
int
i
=
0
;
i
<
newscheme
.
filescount
;
i
++
)
RarFileDelete
(
newscheme
.
files
[
i
]);
free
(
newscheme
.
files
);
goto
error
;
}
...
...
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