summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-13 02:08:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-13 02:08:59 +0200
commit120b38b966b92a50dd36542190d35daba6730eb3 (patch)
treefb15eec67c53a41ae42e2b6bbd15a3f18932e64a /libavformat/utils.c
parent54b2d317ed99622efa07b10aca217e1a083105d9 (diff)
avio: redesign ffio_rewind_with_probe_data()
This prevents a double free Fixes CID718285 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 13a2f2b839..745dcaa8d0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -470,8 +470,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
}
/* rewind. reuse probe buffer to avoid seeking */
- if ((ret = ffio_rewind_with_probe_data(pb, buf, pd.buf_size)) < 0)
- av_free(buf);
+ ret = ffio_rewind_with_probe_data(pb, &buf, pd.buf_size);
return ret;
}