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
bf093863
Commit
bf093863
authored
Dec 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv: fix leak on error
parent
a9984c5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
modules/demux/mkv/util.cpp
modules/demux/mkv/util.cpp
+5
-2
No files found.
modules/demux/mkv/util.cpp
View file @
bf093863
...
@@ -57,16 +57,19 @@ int32_t zlib_decompress_extra( demux_t * p_demux, mkv_track_t * tk )
...
@@ -57,16 +57,19 @@ int32_t zlib_decompress_extra( demux_t * p_demux, mkv_track_t * tk )
do
do
{
{
n
++
;
n
++
;
p_new_extra
=
(
uint8_t
*
)
realloc
(
p_new_extra
,
n
*
1024
);
void
*
alloc
=
realloc
(
p_new_extra
,
n
*
1024
);
if
(
!
p_new_extra
)
if
(
alloc
==
NULL
)
{
{
msg_Err
(
p_demux
,
"Couldn't allocate buffer to inflate data, ignore track %d"
,
msg_Err
(
p_demux
,
"Couldn't allocate buffer to inflate data, ignore track %d"
,
tk
->
i_number
);
tk
->
i_number
);
free
(
p_new_extra
);
inflateEnd
(
&
d_stream
);
inflateEnd
(
&
d_stream
);
free
(
tk
->
p_extra_data
);
free
(
tk
->
p_extra_data
);
delete
tk
;
delete
tk
;
return
1
;
return
1
;
}
}
p_new_extra
=
(
uint8_t
*
)
alloc
;
d_stream
.
next_out
=
&
p_new_extra
[(
n
-
1
)
*
1024
];
d_stream
.
next_out
=
&
p_new_extra
[(
n
-
1
)
*
1024
];
d_stream
.
avail_out
=
1024
;
d_stream
.
avail_out
=
1024
;
result
=
inflate
(
&
d_stream
,
Z_NO_FLUSH
);
result
=
inflate
(
&
d_stream
,
Z_NO_FLUSH
);
...
...
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