diff options
author | Max Kellermann <max@duempel.org> | 2011-07-19 00:24:20 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-07-19 00:24:20 +0200 |
commit | eb2f413cf030a8c9ed51d8dc081e51e4afd287fb (patch) | |
tree | 47c1265e07af284e8a2ced6cb968b5359b754274 /src/output/recorder_output_plugin.c | |
parent | e54748d3554d57f8320dff7390fa605bf23d7cd0 (diff) | |
parent | 736fd0e29326548152e91e4e3fb8c0ea9c1b50ac (diff) | |
download | mpd-eb2f413cf030a8c9ed51d8dc081e51e4afd287fb.tar.gz mpd-eb2f413cf030a8c9ed51d8dc081e51e4afd287fb.tar.xz mpd-eb2f413cf030a8c9ed51d8dc081e51e4afd287fb.zip |
Merge branch 'v0.16.x'
Conflicts:
NEWS
configure.ac
Diffstat (limited to 'src/output/recorder_output_plugin.c')
-rw-r--r-- | src/output/recorder_output_plugin.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/output/recorder_output_plugin.c b/src/output/recorder_output_plugin.c index 346972a6b..070ef4b08 100644 --- a/src/output/recorder_output_plugin.c +++ b/src/output/recorder_output_plugin.c @@ -79,23 +79,27 @@ recorder_output_init(G_GNUC_UNUSED const struct audio_format *audio_format, if (encoder_plugin == NULL) { g_set_error(error_r, recorder_output_quark(), 0, "No such encoder: %s", encoder_name); - return NULL; + goto failure; } recorder->path = config_get_block_string(param, "path", NULL); if (recorder->path == NULL) { g_set_error(error_r, recorder_output_quark(), 0, "'path' not configured"); - return NULL; + goto failure; } /* initialize encoder */ recorder->encoder = encoder_init(encoder_plugin, param, error_r); if (recorder->encoder == NULL) - return NULL; + goto failure; return recorder; + +failure: + g_free(recorder); + return NULL; } static void |