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:
469a65b
)
lavfi/sendcmd: release file in case of failed allocation
author
Stefano Sabatini
<stefasab@gmail.com>
Mon, 22 Oct 2012 23:42:24 +0000
(
01:42
+0200)
committer
Stefano Sabatini
<stefasab@gmail.com>
Tue, 23 Oct 2012 20:08:55 +0000
(22:08 +0200)
Avoid hanging file.
libavfilter/f_sendcmd.c
patch
|
blob
|
history
diff --git
a/libavfilter/f_sendcmd.c
b/libavfilter/f_sendcmd.c
index
7081de8
..
9f17045
100644
(file)
--- a/
libavfilter/f_sendcmd.c
+++ b/
libavfilter/f_sendcmd.c
@@
-398,8
+398,10
@@
static av_cold int init(AVFilterContext *ctx, const char *args)
/* create a 0-terminated string based on the read file */
buf = av_malloc(file_bufsize + 1);
- if (!buf)
+ if (!buf) {
+ av_file_unmap(file_buf, file_bufsize);
return AVERROR(ENOMEM);
+ }
memcpy(buf, file_buf, file_bufsize);
buf[file_bufsize] = 0;
av_file_unmap(file_buf, file_bufsize);