aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/playlist/soundcloud_playlist_plugin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/playlist/soundcloud_playlist_plugin.c b/src/playlist/soundcloud_playlist_plugin.c
index b987de962..ddaf4e96b 100644
--- a/src/playlist/soundcloud_playlist_plugin.c
+++ b/src/playlist/soundcloud_playlist_plugin.c
@@ -43,16 +43,14 @@ static struct {
static bool
soundcloud_init(const struct config_param *param)
{
- const char *apikey = config_get_block_string(param, "apikey", NULL);
-
- if (apikey == NULL) {
+ soundcloud_config.apikey =
+ config_dup_block_string(param, "apikey", NULL);
+ if (soundcloud_config.apikey == NULL) {
g_debug("disabling the soundcloud playlist plugin "
"because API key is not set");
return false;
}
- soundcloud_config.apikey = g_strdup(apikey);
-
return true;
}