Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c0b04d59
Commit
c0b04d59
authored
Dec 01, 2010
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp sout: fix memleak
parent
ec8b3fef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
modules/stream_out/rtpfmt.c
modules/stream_out/rtpfmt.c
+14
-4
No files found.
modules/stream_out/rtpfmt.c
View file @
c0b04d59
...
...
@@ -67,7 +67,10 @@ static int rtp_vorbis_pack_headers(size_t room, void *p_extra, size_t i_extra,
if
(
val
!=
VLC_SUCCESS
)
return
val
;
if
(
packet_count
<
3
)
return
VLC_EGENERIC
;
{
val
=
VLC_EGENERIC
;
goto
free
;
}
unsigned
length_size
[
2
]
=
{
0
,
0
};
for
(
int
i
=
0
;
i
<
2
;
i
++
)
...
...
@@ -84,7 +87,10 @@ static int rtp_vorbis_pack_headers(size_t room, void *p_extra, size_t i_extra,
+
packet_size
[
0
]
+
packet_size
[
1
]
+
packet_size
[
2
];
*
p_buffer
=
malloc
(
*
i_buffer
);
if
(
*
p_buffer
==
NULL
)
return
VLC_ENOMEM
;
{
val
=
VLC_ENOMEM
;
goto
free
;
}
uint8_t
*
p
=
*
p_buffer
+
room
;
/* Number of headers */
...
...
@@ -104,11 +110,15 @@ static int rtp_vorbis_pack_headers(size_t room, void *p_extra, size_t i_extra,
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
memcpy
(
p
,
packet
[
i
],
packet_size
[
i
]);
free
(
packet
[
i
]);
p
+=
packet_size
[
i
];
}
return
VLC_SUCCESS
;
val
=
VLC_SUCCESS
;
free:
for
(
unsigned
i
=
0
;
i
<
packet_count
;
i
++
)
free
(
packet
[
i
]);
return
val
;
}
static
void
sprintf_hexa
(
char
*
s
,
uint8_t
*
p_data
,
int
i_data
)
...
...
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