]> git.sesse.net Git - vlc/blobdiff - modules/access/sdi.cpp
Remember to free the mode name.
[vlc] / modules / access / sdi.cpp
index f2b99cfdafd90aeba5b622bc40d871b8d1d4d4b8..c2a2bdaf725fc3eb8608a456823397b7c72a3d00 100644 (file)
@@ -382,6 +382,7 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Err( p_demux, "Invalid --sdi-audio-connection specified; choose one of " \
                               "embedded, aesebu, or analog." );
+            p_config->Release();
             Close( p_this );
             return VLC_EGENERIC;
         }
@@ -451,6 +452,7 @@ static int Open( vlc_object_t *p_this )
         if( result != S_OK )
         {
             msg_Err( p_demux, "Failed to get display mode name" );
+            free( psz_mode_name );
             p_display_iterator->Release();
             Close( p_this );
             return VLC_EGENERIC;
@@ -461,6 +463,7 @@ static int Open( vlc_object_t *p_this )
         if( result != S_OK )
         {
             msg_Err( p_demux, "Failed to get frame rate" );
+            free( psz_mode_name );
             p_display_iterator->Release();
             Close( p_this );
             return VLC_EGENERIC;
@@ -494,6 +497,7 @@ static int Open( vlc_object_t *p_this )
                  sz_mode_id_text, psz_mode_name,
                  p_display_mode->GetWidth(), p_display_mode->GetHeight(),
                  double(time_scale) / frame_duration, psz_field_dominance );
+        free( psz_mode_name );
 
         if( wanted_mode_id == mode_id )
         {