]> git.sesse.net Git - vlc/commitdiff
src/playlist/item.c:
authorSigmund Augdal Helberg <sigmunau@videolan.org>
Sat, 22 Nov 2003 12:35:17 +0000 (12:35 +0000)
committerSigmund Augdal Helberg <sigmunau@videolan.org>
Sat, 22 Nov 2003 12:35:17 +0000 (12:35 +0000)
 * fixed a minor memory leak

src/playlist/item.c

index 3528271680354f2d9f768c5cb27b411bae0dc358..5114221da5cf528654e9c05e48bb7a921fd05fb3 100644 (file)
@@ -2,7 +2,7 @@
  * item.c : Playlist item functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: item.c,v 1.1 2003/10/29 18:00:46 zorglub Exp $
+ * $Id: item.c,v 1.2 2003/11/22 12:35:17 sigmunau Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -139,6 +139,19 @@ int playlist_AddItem( playlist_t *p_playlist, playlist_item_t * p_item,
                       {
                           free( p_item->psz_uri );
                       }
+                      if( p_item->i_options )
+                      {
+                          int i_opt;
+                          for( i_opt = 0; i_opt < p_item->i_options; i_opt++ )
+                          {
+                              free( p_item->ppsz_options[i_opt] );
+                          }
+                          free( p_item->ppsz_options );
+                      }
+                      if( p_item->psz_author )
+                      {
+                          free( p_item->psz_author );
+                      }
                       free( p_item );
                       vlc_mutex_unlock( &p_playlist->object_lock );
                       return 0;