mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	module-equalizer-sink: use fftwf_free in all the right places
Several mallocs were made using fftwf_malloc and were erroneously freed by pa_xfree. This patch corrects these calls of pa_xfree to fftwf_free.
This commit is contained in:
		
							parent
							
								
									d72cb78d4c
								
							
						
					
					
						commit
						7201c9be98
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -232,7 +232,7 @@ static void alloc_input_buffers(struct userdata *u, size_t min_buffer_length) {
 | 
			
		|||
        if (u->input[c]) {
 | 
			
		||||
            if (!u->first_iteration)
 | 
			
		||||
                memcpy(tmp, u->input[c], u->overlap_size * sizeof(float));
 | 
			
		||||
            free(u->input[c]);
 | 
			
		||||
            fftwf_free(u->input[c]);
 | 
			
		||||
        }
 | 
			
		||||
        u->input[c] = tmp;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -1344,22 +1344,22 @@ void pa__done(pa_module*m) {
 | 
			
		|||
 | 
			
		||||
    fftwf_destroy_plan(u->inverse_plan);
 | 
			
		||||
    fftwf_destroy_plan(u->forward_plan);
 | 
			
		||||
    pa_xfree(u->output_window);
 | 
			
		||||
    fftwf_free(u->output_window);
 | 
			
		||||
    for (c = 0; c < u->channels; ++c) {
 | 
			
		||||
        pa_aupdate_free(u->a_H[c]);
 | 
			
		||||
        pa_xfree(u->overlap_accum[c]);
 | 
			
		||||
        pa_xfree(u->input[c]);
 | 
			
		||||
        fftwf_free(u->overlap_accum[c]);
 | 
			
		||||
        fftwf_free(u->input[c]);
 | 
			
		||||
    }
 | 
			
		||||
    pa_xfree(u->a_H);
 | 
			
		||||
    pa_xfree(u->overlap_accum);
 | 
			
		||||
    pa_xfree(u->input);
 | 
			
		||||
    pa_xfree(u->work_buffer);
 | 
			
		||||
    pa_xfree(u->W);
 | 
			
		||||
    fftwf_free(u->work_buffer);
 | 
			
		||||
    fftwf_free(u->W);
 | 
			
		||||
    for (c = 0; c < u->channels; ++c) {
 | 
			
		||||
        pa_xfree(u->Xs[c]);
 | 
			
		||||
        for (size_t i = 0; i < 2; ++i)
 | 
			
		||||
            pa_xfree(u->Hs[c][i]);
 | 
			
		||||
        pa_xfree(u->Hs[c]);
 | 
			
		||||
            fftwf_free(u->Hs[c][i]);
 | 
			
		||||
        fftwf_free(u->Hs[c]);
 | 
			
		||||
    }
 | 
			
		||||
    pa_xfree(u->Xs);
 | 
			
		||||
    pa_xfree(u->Hs);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue