mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
tests: fix memory leak in filtering and generation tests
This commit is contained in:
@@ -49,6 +49,7 @@ ma_result test_bpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_bpf2_uninit(&bpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
@@ -110,6 +111,7 @@ ma_result test_bpf4__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_bpf_uninit(&bpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_hishelf2__by_format(const char* pInputFilePath, const char* pOutp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_hishelf2_uninit(&hishelf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_hpf1__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_hpf1_uninit(&hpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
@@ -110,6 +111,7 @@ ma_result test_hpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_hpf2_uninit(&hpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
@@ -171,6 +173,7 @@ ma_result test_hpf3__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_hpf_uninit(&hpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_loshelf2__by_format(const char* pInputFilePath, const char* pOutp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_loshelf2_uninit(&loshelf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_lpf1__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_lpf1_uninit(&lpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
@@ -110,6 +111,7 @@ ma_result test_lpf2__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_lpf2_uninit(&lpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
@@ -172,6 +174,7 @@ ma_result test_lpf3__by_format(const char* pInputFilePath, const char* pOutputFi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_lpf_uninit(&lpf, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_notch2__by_format(const char* pInputFilePath, const char* pOutput
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_notch2_uninit(¬ch, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ ma_result test_peak2__by_format(const char* pInputFilePath, const char* pOutputF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ma_peak2_uninit(&peak, NULL);
|
||||||
ma_decoder_uninit(&decoder);
|
ma_decoder_uninit(&decoder);
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ ma_result test_noise__by_format_and_type(ma_format format, ma_noise_type type, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
ma_encoder_uninit(&encoder);
|
ma_encoder_uninit(&encoder);
|
||||||
|
ma_noise_uninit(&noise, NULL);
|
||||||
return MA_SUCCESS;
|
return MA_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user