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
35162044
Commit
35162044
authored
Aug 24, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream: fix corner-case memory leak
parent
34d4f313
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/input/stream.c
src/input/stream.c
+3
-2
No files found.
src/input/stream.c
View file @
35162044
...
@@ -379,9 +379,11 @@ ssize_t stream_Peek(stream_t *s, const uint8_t **restrict bufp, size_t len)
...
@@ -379,9 +379,11 @@ ssize_t stream_Peek(stream_t *s, const uint8_t **restrict bufp, size_t len)
if
(
unlikely
(
peek
==
NULL
))
if
(
unlikely
(
peek
==
NULL
))
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
*
bufp
=
peek
->
p_buffer
;
if
(
unlikely
(
len
==
0
))
if
(
unlikely
(
len
==
0
))
{
{
*
bufp
=
peek
->
p_buffer
;
priv
->
peek
=
peek
;
return
0
;
return
0
;
}
}
...
@@ -392,7 +394,6 @@ ssize_t stream_Peek(stream_t *s, const uint8_t **restrict bufp, size_t len)
...
@@ -392,7 +394,6 @@ ssize_t stream_Peek(stream_t *s, const uint8_t **restrict bufp, size_t len)
return
ret
;
return
ret
;
}
}
*
bufp
=
peek
->
p_buffer
;
peek
->
i_buffer
=
ret
;
peek
->
i_buffer
=
ret
;
priv
->
peek
=
peek
;
priv
->
peek
=
peek
;
return
ret
;
return
ret
;
...
...
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