Commit a76bdaab authored by Andrey Astafyev's avatar Andrey Astafyev Committed by Erik de Castro Lopo
Browse files

replaygain: Fixed usage of gainfilter variable after free

parent 020042cc
......@@ -384,9 +384,12 @@ ValidGainFrequency ( long samplefreq )
{
struct ReplayGainFilter* gainfilter = CreateGainFilter( samplefreq );
free(gainfilter);
return gainfilter != 0;
if (gainfilter == 0) {
return 0;
} else {
free(gainfilter);
return 1;
}
}
int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment