[vlc-devel] [PATCH 2/5] demux/playlist/itml: free_track: simplify
Filip Roséen
filip at atch.se
Sun May 21 20:49:05 CEST 2017
There is no need for FREENULL of the data-members when the whole
object is being deallocated directly after.
---
modules/demux/playlist/itml.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/demux/playlist/itml.c b/modules/demux/playlist/itml.c
index 5a5eb3b048..fda2e102bc 100644
--- a/modules/demux/playlist/itml.c
+++ b/modules/demux/playlist/itml.c
@@ -366,13 +366,12 @@ static void free_track( track_elem_t *p_track )
if ( !p_track )
return;
- FREENULL( p_track->name );
- FREENULL( p_track->artist );
- FREENULL( p_track->album );
- FREENULL( p_track->genre );
- FREENULL( p_track->trackNum );
- FREENULL( p_track->location );
- p_track->duration = 0;
+ free( p_track->name );
+ free( p_track->artist );
+ free( p_track->album );
+ free( p_track->genre );
+ free( p_track->trackNum );
+ free( p_track->location );
free( p_track );
}
--
2.13.0
More information about the vlc-devel
mailing list