projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e034cc6
)
idcin: fix memleaks in idcin_read_packet()
author
Justin Ruggles
<justin.ruggles@gmail.com>
Tue, 15 Jan 2013 21:20:57 +0000
(16:20 -0500)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 16 Jan 2013 17:21:35 +0000
(12:21 -0500)
Fixes fate-id-cin-video failures when running FATE with valgrind.
libavformat/idcin.c
patch
|
blob
|
history
diff --git
a/libavformat/idcin.c
b/libavformat/idcin.c
index
b7e87a7
..
18da918
100644
(file)
--- a/
libavformat/idcin.c
+++ b/
libavformat/idcin.c
@@
-309,6
+309,7
@@
static int idcin_read_packet(AVFormatContext *s,
return ret;
else if (ret != chunk_size) {
av_log(s, AV_LOG_ERROR, "incomplete packet\n");
+ av_free_packet(pkt);
return AVERROR(EIO);
}
if (command == 1) {
@@
-316,8
+317,10
@@
static int idcin_read_packet(AVFormatContext *s,
pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE,
AVPALETTE_SIZE);
- if (ret < 0)
+ if (ret < 0) {
+ av_free_packet(pkt);
return ret;
+ }
memcpy(pal, palette, AVPALETTE_SIZE);
pkt->flags |= AV_PKT_FLAG_KEY;
}