aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2011-07-18 13:38:46 +0200
committerMax Kellermann <max@duempel.org>2011-07-18 22:03:48 +0200
commit36aa8ce3c9f34d41aa7fd94d90f23ba62f5caafb (patch)
treec1a95f7f0defa4812e721eb52f1f99c93aedf516 /src/output
parentc49c69d6ea0b7670f70066f0735fcffc69966d46 (diff)
downloadmpd-36aa8ce3c9f34d41aa7fd94d90f23ba62f5caafb.tar.gz
mpd-36aa8ce3c9f34d41aa7fd94d90f23ba62f5caafb.tar.xz
mpd-36aa8ce3c9f34d41aa7fd94d90f23ba62f5caafb.zip
output/ao: add missing g_free in error path
Diffstat (limited to '')
-rw-r--r--src/output/ao_plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/output/ao_plugin.c b/src/output/ao_plugin.c
index 6fedbc6e2..42ece5a3a 100644
--- a/src/output/ao_plugin.c
+++ b/src/output/ao_plugin.c
@@ -106,12 +106,14 @@ ao_output_init(G_GNUC_UNUSED const struct audio_format *audio_format,
g_set_error(error, ao_output_quark(), 0,
"\"%s\" is not a valid ao driver",
value);
+ g_free(ad);
return NULL;
}
if ((ai = ao_driver_info(ad->driver)) == NULL) {
g_set_error(error, ao_output_quark(), 0,
"problems getting driver info");
+ g_free(ad);
return NULL;
}
@@ -129,6 +131,7 @@ ao_output_init(G_GNUC_UNUSED const struct audio_format *audio_format,
g_set_error(error, ao_output_quark(), 0,
"problems parsing options \"%s\"",
options[i]);
+ g_free(ad);
return NULL;
}