1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

tools/target_swr_fuzzer: fix memory leak on av_samples_fill_arrays() error

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Kacper Michajłow
2025-04-02 01:36:30 +02:00
committed by Michael Niedermayer
parent d5ad860cd8
commit 2a2b5aec5b

View File

@ -79,7 +79,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
char out_layout_string[256];
uint8_t * ain[SWR_CH_MAX];
uint8_t *aout[SWR_CH_MAX];
uint8_t *out_data;
uint8_t *out_data = NULL;
int in_sample_nb;
int out_sample_nb = size;
int count;
@ -145,9 +145,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
count = swr_convert(swr, aout, out_sample_nb, (const uint8_t **)ain, in_sample_nb);
av_freep(&out_data);
end:
av_freep(&out_data);
swr_free(&swr);
return 0;