git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f48b6b8
)
avcodec/bsf: fix resource leak in av_bsf_list_parse_str
author
Steven Liu
<lq@chinaffmpeg.org>
Tue, 10 Jan 2017 20:09:47 +0000
(
04:09
+0800)
committer
Steven Liu
<lq@chinaffmpeg.org>
Tue, 10 Jan 2017 20:09:47 +0000
(
04:09
+0800)
cid:
1396268
when av_strdup(str) error, the lst need release
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
libavcodec/bsf.c
patch
|
blob
|
history
diff --git
a/libavcodec/bsf.c
b/libavcodec/bsf.c
index
ac2024b
..
c984526
100644
(file)
--- a/
libavcodec/bsf.c
+++ b/
libavcodec/bsf.c
@@
-514,8
+514,10
@@
int av_bsf_list_parse_str(const char *str, AVBSFContext **bsf_lst)
if (!lst)
return AVERROR(ENOMEM);
- if (!(dup = buf = av_strdup(str)))
- return AVERROR(ENOMEM);
+ if (!(dup = buf = av_strdup(str))) {
+ ret = AVERROR(ENOMEM);
+ goto end;
+ }
while (1) {
bsf_str = av_strtok(buf, ",", &saveptr);