diff --git a/modules/access/cdda.c b/modules/access/cdda.c
index cd4c1a4c8d737938b9da8c3d3bbf39ae873b8440..1bba490438fe847721170ea69a3a411effc9d4df 100644
--- a/modules/access/cdda.c
+++ b/modules/access/cdda.c
@@ -404,7 +404,6 @@ error:
 static void AccessGetMeta(stream_t *access, vlc_meta_t *meta)
 {
     access_sys_t *sys = access->p_sys;
-    const char *str;
 
     vlc_meta_SetTitle(meta, "Audio CD");
 
@@ -421,7 +420,7 @@ static void AccessGetMeta(stream_t *access, vlc_meta_t *meta)
 #ifdef HAVE_LIBCDDB
     if (sys->cddb != NULL)
     {
-        str = cddb_disc_get_title(sys->cddb);
+        char *str = cddb_disc_get_title(sys->cddb);
         if (NONEMPTY(str))
             vlc_meta_SetTitle(meta, str);