aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput_ao.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/audioOutput_ao.c')
-rw-r--r--src/audioOutput_ao.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/audioOutput_ao.c b/src/audioOutput_ao.c
index efba88529..3dafc8e89 100644
--- a/src/audioOutput_ao.c
+++ b/src/audioOutput_ao.c
@@ -135,9 +135,14 @@ static void audioOutputAo_initDriver(AudioOutput * audioOutput) {
free(dup);
}
+static void freeAoData(AoData * ad) {
+ ao_free_options(ad->options);
+ free(ad);
+}
+
static void audioOutputAo_finishDriver(AudioOutput * audioOutput) {
AoData * ad = (AoData *)audioOutput->data;
- ao_free_options(ad->options);
+ freeAoData(ad);
driverInitCount--;