From e0294ac74c872e2672d0ce0f3dd905fb9d92e404 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 23 Jun 2020 19:55:46 +1000 Subject: [PATCH] Fix a bug in fixed_sized_callback. This is uninitializing the ring buffer before the device which results in a situation where a stray data callback may try touching the buffer after it's be uninitialized. --- examples/fixed_size_callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/fixed_size_callback.c b/examples/fixed_size_callback.c index ceede833..dfff9931 100644 --- a/examples/fixed_size_callback.c +++ b/examples/fixed_size_callback.c @@ -132,9 +132,9 @@ int main(int argc, char** argv) printf("Press Enter to quit...\n"); getchar(); - ma_pcm_rb_uninit(&g_rb); ma_device_uninit(&device); - + ma_pcm_rb_uninit(&g_rb); + (void)argc; (void)argv; return 0;