[vlc-devel] commit: playlist_SaveArt: fix a memleak. ( Rémi Duraffort )

git version control git at videolan.org
Mon Jan 26 12:19:10 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jan 26 12:17:58 2009 +0100| [d5bf5632c54c12e9f4ce8a4fa3c3cd22e010cd1a] | committer: Rémi Duraffort 

playlist_SaveArt: fix a memleak.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d5bf5632c54c12e9f4ce8a4fa3c3cd22e010cd1a
---

 src/playlist/art.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/playlist/art.c b/src/playlist/art.c
index 1efe0de..aa6987a 100644
--- a/src/playlist/art.c
+++ b/src/playlist/art.c
@@ -217,6 +217,7 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item,
     if( !utf8_stat( psz_filename+7, &s ) )
     {
         input_item_SetArtURL( p_item, psz_filename );
+        free( psz_filename );
         return VLC_SUCCESS;
     }
 
@@ -235,6 +236,7 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item,
         }
         fclose( f );
     }
+    free( psz_filename );
     return VLC_SUCCESS;
 }
 




More information about the vlc-devel mailing list