]> git.sesse.net Git - vlc/blobdiff - modules/access/cdda/access.c
Fix tiny memleak.
[vlc] / modules / access / cdda / access.c
index ddf974a706e75270fa3ef0eb2997f33336aecc57..f4de5bd75d2bc2f2a0bd190671f023982f196530 100644 (file)
@@ -30,7 +30,6 @@
 #include "cdda.h"          /* private structures. Also #includes vlc things */
 #include "info.h"          /* headers for meta info retrieval */
 #include "access.h"
-#include <vlc_playlist.h>  /* Has to come *after* cdda.h */
 #include "vlc_keys.h"
 #include <vlc_interface.h>
 
@@ -606,6 +605,7 @@ int CDDAOpen( vlc_object_t *p_this )
         psz_source = var_CreateGetString( p_this, "cd-audio" );
         if( !psz_source || !*psz_source )
         {
+            free( psz_source );
             /* Scan for a CD-ROM drive with a CD-DA in it. */
             char **ppsz_drives =
                     cdio_get_devices_with_cap( NULL,  CDIO_FS_AUDIO, false );
@@ -635,7 +635,6 @@ int CDDAOpen( vlc_object_t *p_this )
     p_cdda = calloc( 1, sizeof(cdda_data_t) );
     if( p_cdda == NULL )
     {
-        msg_Err( p_access, "out of memory" );
         free( psz_source );
         return VLC_ENOMEM;
     }
@@ -773,6 +772,7 @@ int CDDAOpen( vlc_object_t *p_this )
                 }
             }
         }
+        free( psz_paranoia );
     }
 #endif