Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b805c725
Commit
b805c725
authored
Jan 15, 2013
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
idcin: fix memleaks in idcin_read_packet()
Fixes fate-id-cin-video failures when running FATE with valgrind.
parent
e034cc6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
idcin.c
libavformat/idcin.c
+4
-1
No files found.
libavformat/idcin.c
View file @
b805c725
...
@@ -309,6 +309,7 @@ static int idcin_read_packet(AVFormatContext *s,
...
@@ -309,6 +309,7 @@ static int idcin_read_packet(AVFormatContext *s,
return
ret
;
return
ret
;
else
if
(
ret
!=
chunk_size
)
{
else
if
(
ret
!=
chunk_size
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"incomplete packet
\n
"
);
av_log
(
s
,
AV_LOG_ERROR
,
"incomplete packet
\n
"
);
av_free_packet
(
pkt
);
return
AVERROR
(
EIO
);
return
AVERROR
(
EIO
);
}
}
if
(
command
==
1
)
{
if
(
command
==
1
)
{
...
@@ -316,8 +317,10 @@ static int idcin_read_packet(AVFormatContext *s,
...
@@ -316,8 +317,10 @@ static int idcin_read_packet(AVFormatContext *s,
pal
=
av_packet_new_side_data
(
pkt
,
AV_PKT_DATA_PALETTE
,
pal
=
av_packet_new_side_data
(
pkt
,
AV_PKT_DATA_PALETTE
,
AVPALETTE_SIZE
);
AVPALETTE_SIZE
);
if
(
ret
<
0
)
if
(
ret
<
0
)
{
av_free_packet
(
pkt
);
return
ret
;
return
ret
;
}
memcpy
(
pal
,
palette
,
AVPALETTE_SIZE
);
memcpy
(
pal
,
palette
,
AVPALETTE_SIZE
);
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
}
}
...
...
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