mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
tests/audiomatch: add free to make static analysis tools happy
Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
parent
345d04e870
commit
412c3b37a4
@ -82,9 +82,9 @@ int main(int argc, char **argv) {
|
||||
signal = malloc(siglen * sizeof(*signal));
|
||||
|
||||
if (fread(data , 1, datlen, f[0]) != datlen)
|
||||
return 1;
|
||||
goto read_fail;
|
||||
if (fread(signal, 1, siglen, f[1]) != siglen)
|
||||
return 1;
|
||||
goto read_fail;
|
||||
datlen /= 2;
|
||||
siglen /= 2;
|
||||
|
||||
@ -111,5 +111,12 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
printf("presig: %d postsig:%d c:%7.4f lenerr:%d\n", bestpos, datlen - siglen - bestpos, bestc / sigamp, datlen - siglen);
|
||||
|
||||
free(data);
|
||||
free(signal);
|
||||
return 0;
|
||||
|
||||
read_fail:
|
||||
free(data);
|
||||
free(signal);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user