avio: redesign ffio_rewind_with_probe_data()
This prevents a double free Fixes CID718285 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user