Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
427e9810
Commit
427e9810
authored
Oct 10, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter/httplive.c: fix potential memory leak
parent
6047589d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
modules/stream_filter/httplive.c
modules/stream_filter/httplive.c
+7
-3
No files found.
modules/stream_filter/httplive.c
View file @
427e9810
...
...
@@ -986,6 +986,7 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t *
msg_Info
(
s
,
"updating hls stream (program-id=%d, bandwidth=%"
PRIu64
") has %d segments"
,
hls_new
->
id
,
hls_new
->
bandwidth
,
count
);
for
(
int
n
=
0
;
n
<
count
;
n
++
)
{
segment_t
*
p
=
segment_GetSegment
(
hls_new
,
n
);
...
...
@@ -1105,7 +1106,6 @@ static int hls_ReloadPlaylist(stream_t *s)
hls_new
->
id
,
hls_new
->
bandwidth
);
}
}
vlc_array_destroy
(
hls_streams
);
return
VLC_SUCCESS
;
}
...
...
@@ -1432,14 +1432,18 @@ static int hls_Download(stream_t *s, segment_t *segment)
if
(
size
>
segment
->
size
)
{
msg_Dbg
(
s
,
"size changed %"
PRIu64
,
segment
->
size
);
segment
->
data
=
block_Realloc
(
segment
->
data
,
0
,
size
);
if
(
segment
->
data
==
NULL
)
block_t
*
p_block
=
block_Realloc
(
segment
->
data
,
0
,
size
);
if
(
p_block
==
NULL
)
{
stream_Delete
(
p_ts
);
block_Release
(
segment
->
data
);
segment
->
data
=
NULL
;
return
VLC_ENOMEM
;
}
segment
->
data
=
p_block
;
segment
->
size
=
size
;
assert
(
segment
->
data
->
i_buffer
==
segment
->
size
);
p_block
=
NULL
;
}
length
=
stream_Read
(
p_ts
,
segment
->
data
->
p_buffer
+
curlen
,
segment
->
size
-
curlen
);
if
(
length
<=
0
)
...
...
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