]> git.sesse.net Git - vlc/commitdiff
Remove useless test before a free (again).
authorRémi Duraffort <ivoire@videolan.org>
Tue, 11 Mar 2008 21:26:54 +0000 (22:26 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Tue, 11 Mar 2008 21:57:37 +0000 (22:57 +0100)
19 files changed:
modules/demux/asf/libasf.c
modules/demux/avi/libavi.c
modules/demux/live555.cpp
modules/demux/mkv.cpp
modules/demux/mp4/mp4.c
modules/demux/nsc.c
modules/demux/ogg.c
modules/demux/playlist/asx.c
modules/demux/playlist/b4s.c
modules/demux/playlist/dvb.c
modules/demux/playlist/m3u.c
modules/demux/playlist/podcast.c
modules/demux/playlist/sgimb.c
modules/demux/playlist/shoutcast.c
modules/demux/ps.h
modules/demux/real.c
modules/demux/subtitle.c
modules/demux/ts.c
modules/demux/vobsub.c

index 8453b0f017332b1c3b19762b423bc0cd718d2f42..0ac06b7dab5462374b0ecf67dabe5a85183f7d8a 100644 (file)
@@ -314,10 +314,10 @@ static void ASF_FreeObject_metadata( asf_object_t *p_obj )
 
     for( i = 0; i < p_meta->i_record_entries_count; i++ )
     {
-        if( p_meta->record[i].psz_name ) free( p_meta->record[i].psz_name );
-        if( p_meta->record[i].p_data ) free( p_meta->record[i].p_data );
+        free( p_meta->record[i].psz_name );
+        free( p_meta->record[i].p_data );
     }
-    if( p_meta->record ) free( p_meta->record );
+    free( p_meta->record );
 }
 
 static int ASF_ReadObject_metadata( stream_t *s, asf_object_t *p_obj )
index d991dcd999ef7cc241e982dc6a9029fe5ad84d42..dfd89478283ecf765a21b33dd426349c49739725 100644 (file)
@@ -444,7 +444,7 @@ static int AVI_ChunkRead_strd( stream_t *s, avi_chunk_t *p_chk )
 
 static void AVI_ChunkFree_strd( avi_chunk_t *p_chk )
 {
-    if( p_chk->strd.p_data ) free( p_chk->strd.p_data );
+    free( p_chk->strd.p_data );
 }
 
 static int AVI_ChunkRead_idx1( stream_t *s, avi_chunk_t *p_chk )
index 710aa6a04b2af7299fe2ab5a52d69fc860744e09..ce52ecd1e62be062272e42a4b08a9e99f561c91e 100644 (file)
@@ -400,9 +400,9 @@ error:
         vlc_object_detach( p_sys->p_timeout );
         vlc_object_release( p_sys->p_timeout );
     }
-    if( p_sys->scheduler ) delete p_sys->scheduler;
-    if( p_sys->p_sdp ) free( p_sys->p_sdp );
-    if( p_sys->psz_path ) free( p_sys->psz_path );
+    delete p_sys->scheduler;
+    free( p_sys->p_sdp );
+    free( p_sys->psz_path );
 
     vlc_UrlClean( &p_sys->url );
 
@@ -441,9 +441,9 @@ static void Close( vlc_object_t *p_this )
         vlc_object_detach( p_sys->p_timeout );
         vlc_object_release( p_sys->p_timeout );
     }
-    if( p_sys->scheduler ) delete p_sys->scheduler;
-    if( p_sys->p_sdp ) free( p_sys->p_sdp );
-    if( p_sys->psz_path ) free( p_sys->psz_path );
+    delete p_sys->scheduler;
+    free( p_sys->p_sdp );
+    free( p_sys->psz_path );
 
     vlc_UrlClean( &p_sys->url );
 
@@ -563,8 +563,8 @@ describe:
             int i_result;
             msg_Dbg( p_demux, "authentication failed" );
 
-            if( psz_user ) free( psz_user );
-            if( psz_pwd ) free( psz_pwd );
+            free( psz_user );
+            free( psz_pwd );
             psz_user = psz_pwd = NULL;
 
             i_result = intf_UserLoginPassword( p_demux, _("RTSP authentication"),
@@ -599,11 +599,11 @@ describe:
     }
 
     /* malloc-ated copy */
-    if( psz_url ) free( psz_url );
-    if( psz_user ) free( psz_user );
-    if( psz_pwd ) free( psz_pwd );
+    free( psz_url );
+    free( psz_user );
+    free( psz_pwd );
 
-    if( p_sys->p_sdp ) free( p_sys->p_sdp );
+    free( p_sys->p_sdp );
     p_sys->p_sdp = NULL;
     if( p_sdp ) p_sys->p_sdp = strdup( (char*)p_sdp );
     delete[] p_sdp;
@@ -1882,7 +1882,7 @@ static unsigned char* parseH264ConfigStr( char const* configStr,
         psz += strlen(psz)+1;
     }
 
-    if( dup ) free( dup );
+    free( dup );
     return cfg;
 }
 
index e0ea9a7a3f6fab9a73d473bbdf1d9d2ba06b26df..32073d21995df6db0cedd6f855987d3543d7805b 100644 (file)
@@ -1048,35 +1048,17 @@ public:
                 delete tracks[i_track]->p_compression_data;
             }
             es_format_Clean( &tracks[i_track]->fmt );
-            if( tracks[i_track]->p_extra_data )
-                free( tracks[i_track]->p_extra_data );
-            if( tracks[i_track]->psz_codec )
-                free( tracks[i_track]->psz_codec );
+            free( tracks[i_track]->p_extra_data );
+            free( tracks[i_track]->psz_codec );
             delete tracks[i_track];
         }
 
-        if( psz_writing_application )
-        {
-            free( psz_writing_application );
-        }
-        if( psz_muxing_application )
-        {
-            free( psz_muxing_application );
-        }
-        if( psz_segment_filename )
-        {
-            free( psz_segment_filename );
-        }
-        if( psz_title )
-        {
-            free( psz_title );
-        }
-        if( psz_date_utc )
-        {
-            free( psz_date_utc );
-        }
-        if ( p_indexes )
-            free( p_indexes );
+        free( psz_writing_application );
+        free( psz_muxing_application );
+        free( psz_segment_filename );
+        free( psz_title );
+        free( psz_date_utc );
+        free( p_indexes );
 
         delete ep;
         delete segment;
@@ -1313,7 +1295,7 @@ public:
     {}
     virtual ~attachment_c()
     {
-        if( p_data ) free( p_data );
+        free( p_data );
     }
 
     std::string    psz_file_name;
index 4ee33e7d5c9af6f9f6889e09f4371ab0e07f231f..ee0659462efa5499e0dd5c23377e93a965d071f1 100644 (file)
@@ -439,7 +439,7 @@ static int Open( vlc_object_t * p_this )
                     msg_Err( p_demux, "unknown ref type=%4.4s FIXME (send a bug report)",
                              (char*)&p_rdrf->data.p_rdrf->i_ref_type );
                 }
-                if( psz_ref ) free( psz_ref );
+                free( psz_ref );
             }
             if( b_play && p_item_in_category &&
                 p_item_in_category->i_children > 0 )
index e1a25799b1fa43067e0b0f66683a180e34a56ddf..d6561d3547a749371af88a216ffb693040880988 100644 (file)
@@ -341,7 +341,7 @@ static int ParseLine ( demux_t *p_demux, char *psz_line )
         if( psz_out )
         {
             msg_Dbg( p_demux, "%s = %s", psz_bol, psz_out );
-            if( psz_out) free( psz_out );
+            free( psz_out );
         }
     }
     return VLC_SUCCESS;
@@ -359,7 +359,7 @@ static int Demux ( demux_t *p_demux )
     while( ( psz_line = stream_ReadLine( p_demux->s ) ) )
     {
         ParseLine( p_demux, psz_line );
-        if( psz_line ) free( psz_line );
+        free( psz_line );
     }
     return VLC_SUCCESS;
 }
index 6c9c15f973eeb548da45c278635a6fa3807022bb..ab3c081bd8e6e0099fd9a46b92e704c866910674 100644 (file)
@@ -1191,8 +1191,7 @@ static void Ogg_EndOfStream( demux_t *p_demux )
         p_ogg->i_bitrate -= p_stream->fmt.i_bitrate;
 
         ogg_stream_clear( &p_ogg->pp_stream[i_stream]->os );
-        if( p_ogg->pp_stream[i_stream]->p_headers)
-            free( p_ogg->pp_stream[i_stream]->p_headers );
+        free( p_ogg->pp_stream[i_stream]->p_headers );
 
         es_format_Clean( &p_stream->fmt );
 
@@ -1201,7 +1200,7 @@ static void Ogg_EndOfStream( demux_t *p_demux )
 #undef p_stream
 
     /* Reinit p_ogg */
-    if( p_ogg->pp_stream ) free( p_ogg->pp_stream );
+    free( p_ogg->pp_stream );
     p_ogg->pp_stream = NULL;
     p_ogg->i_streams = 0;
 }
index b24c91772bc210f239a7f60867c9828ce00c9eab..de4a968ddb3ab84433ca005bb129effcc665f92b 100644 (file)
@@ -61,7 +61,7 @@ static int StoreString( demux_t *p_demux, char **ppsz_string,
     demux_sys_t *p_sys = p_demux->p_sys;
     unsigned len = psz_source_end - psz_source_start;
 
-    if( *ppsz_string ) free( *ppsz_string );
+    free( *ppsz_string );
 
     char *buf = *ppsz_string = malloc ((len * (1 + !p_sys->b_utf8)) + 1);
     if (buf == NULL)
@@ -221,8 +221,8 @@ void E_(Close_ASX)( vlc_object_t *p_this )
     demux_t *p_demux = (demux_t *)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    if( p_sys->psz_prefix ) free( p_sys->psz_prefix );
-    if( p_sys->psz_data ) free( p_sys->psz_data );
+    free( p_sys->psz_prefix );
+    free( p_sys->psz_data );
     free( p_sys );
 }
 
index 0d0ce0e7cf876e94e7585058e3a5f9d1881fa9ff..a4c21d0cba48881a75ad7d0a2e8968fb9d7a3517 100644 (file)
@@ -72,7 +72,7 @@ void E_(Close_B4S)( vlc_object_t *p_this )
     demux_t *p_demux = (demux_t *)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    if( p_sys->psz_prefix ) free( p_sys->psz_prefix );
+    free( p_sys->psz_prefix );
     if( p_sys->p_xml_reader ) xml_ReaderDelete( p_sys->p_xml, p_sys->p_xml_reader );
     if( p_sys->p_xml ) xml_Delete( p_sys->p_xml );
     free( p_sys );
@@ -97,7 +97,7 @@ static int Demux( demux_t *p_demux )
     if( !p_xml ) return -1;
 
     psz_elname = stream_ReadLine( p_demux->s );
-    if( psz_elname ) free( psz_elname );
+    free( psz_elname );
     psz_elname = 0;
 
     p_xml_reader = xml_ReaderCreate( p_xml, p_demux->s );
@@ -119,7 +119,7 @@ static int Demux( demux_t *p_demux )
     {
         msg_Err( p_demux, "invalid root node %i, %s",
                  xml_ReaderNodeType( p_xml_reader ), psz_elname );
-        if( psz_elname ) free( psz_elname );
+        free( psz_elname );
         vlc_object_release( p_playlist );
         return -1;
     }
@@ -141,7 +141,7 @@ static int Demux( demux_t *p_demux )
         strcmp( psz_elname, "playlist" ) )
     {
         msg_Err( p_demux, "invalid child node %s", psz_elname );
-        if( psz_elname ) free( psz_elname );
+        free( psz_elname );
         return -1;
     }
     free( psz_elname ); psz_elname = 0;
@@ -183,7 +183,7 @@ static int Demux( demux_t *p_demux )
             case XML_READER_STARTELEM:
             {
                 // Read the element name
-                if( psz_elname ) free( psz_elname );
+                free( psz_elname );
                 psz_elname = xml_ReaderName( p_xml_reader );
                 if( !psz_elname ) return -1;
 
index 1b51dd088ea1b6e3dc6d8c85808a0961f76d12f9..1dd1461d59959788721059eec9fe8c590c97ff1b 100644 (file)
@@ -126,7 +126,7 @@ static int Demux( demux_t *p_demux )
         input_ItemAddSubItem( p_current_input, p_input );
         vlc_gc_decref( p_input );
         while( i_options-- ) free( ppsz_options[i_options] );
-        if( ppsz_options ) free( ppsz_options );
+        free( ppsz_options );
 
         free( psz_line );
     }
@@ -280,7 +280,7 @@ static int ParseLine( char *psz_line, char **ppsz_name,
     {
         /* This isn't a valid channels file, cleanup everything */
         while( (*pi_options)-- ) free( (*pppsz_options)[*pi_options] );
-        if( *pppsz_options ) free( *pppsz_options );
+        free( *pppsz_options );
         *pppsz_options = 0; *pi_options = 0;
     }
 
index 90f8adafcfeeead84996626ee8779c703a4da775..263f97d0021869b0981fda18e00124ca1b03a951 100644 (file)
@@ -212,11 +212,11 @@ static int Demux( demux_t *p_demux )
         {
             /* Cleanup state */
             while( i_options-- ) free( (char*)ppsz_options[i_options] );
-            if( ppsz_options ) free( ppsz_options );
+            free( ppsz_options );
             ppsz_options = NULL; i_options = 0;
-            if( psz_name ) free( psz_name );
+            free( psz_name );
             psz_name = NULL;
-            if ( psz_artist ) free( psz_artist );
+            free( psz_artist );
             psz_artist = NULL;
             i_parsed_duration = 0;
             i_duration = -1;
index acc5d9261ebe9b8c22de979d91576c5ae7fe0f05..11db8c4cbf73abc8af948611c3bd3f2cb624ab3d 100644 (file)
@@ -75,7 +75,7 @@ void E_(Close_podcast)( vlc_object_t *p_this )
     demux_t *p_demux = (demux_t *)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    if( p_sys->psz_prefix ) free( p_sys->psz_prefix );
+    free( p_sys->psz_prefix );
     if( p_sys->p_playlist ) vlc_object_release( p_sys->p_playlist );
     if( p_sys->p_xml_reader ) xml_ReaderDelete( p_sys->p_xml, p_sys->p_xml_reader );
     if( p_sys->p_xml ) xml_Delete( p_sys->p_xml );
@@ -134,7 +134,7 @@ static int Demux( demux_t *p_demux )
     {
         msg_Err( p_demux, "invalid root node %i, %s",
                  xml_ReaderNodeType( p_xml_reader ), psz_elname );
-        if( psz_elname ) free( psz_elname );
+        free( psz_elname );
         return -1;
     }
     free( psz_elname ); psz_elname = NULL;
@@ -153,7 +153,7 @@ static int Demux( demux_t *p_demux )
             case XML_READER_STARTELEM:
             {
                 // Read the element name
-                if( psz_elname ) free( psz_elname );
+                free( psz_elname );
                 psz_elname = xml_ReaderName( p_xml_reader );
                 if( !psz_elname ) return -1;
 
index 92e9ca946ee6e3bf9da5dfacafcfa0f843777b96..ba7a1cd0aab76e0aa03f47385a05ca168661bc94 100644 (file)
@@ -183,20 +183,13 @@ void E_(Close_SGIMB)( vlc_object_t *p_this )
 {
     demux_t *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
-    if( p_sys->psz_uri )
-        free( p_sys->psz_uri );
-    if( p_sys->psz_server )
-        free( p_sys->psz_server );
-    if( p_sys->psz_location )
-        free( p_sys->psz_location );
-    if( p_sys->psz_name )
-        free( p_sys->psz_name );
-    if( p_sys->psz_user )
-        free( p_sys->psz_user );
-    if( p_sys->psz_password )
-        free( p_sys->psz_password );
-    if( p_sys->psz_mcast_ip )
-        free( p_sys->psz_mcast_ip );
+    free( p_sys->psz_uri );
+    free( p_sys->psz_server );
+    free( p_sys->psz_location );
+    free( p_sys->psz_name );
+    free( p_sys->psz_user );
+    free( p_sys->psz_password );
+    free( p_sys->psz_mcast_ip );
     free( p_demux->p_sys );
     return;
 }
@@ -325,7 +318,7 @@ static int Demux ( demux_t *p_demux )
     while( ( psz_line = stream_ReadLine( p_demux->s ) ) )
     {
         ParseLine( p_demux, psz_line );
-        if( psz_line ) free( psz_line );
+        free( psz_line );
     }
 
     if( p_sys->psz_mcast_ip )
@@ -335,7 +328,7 @@ static int Demux ( demux_t *p_demux )
         char *temp;
 
         asprintf( &temp, "udp://@" "%s:%i", p_sys->psz_mcast_ip, p_sys->i_mcast_port );
-        if( p_sys->psz_uri ) free( p_sys->psz_uri );
+        free( p_sys->psz_uri );
         p_sys->psz_uri = strdup( temp );
         free( temp );
     }
index 98ce107b994466a7ad5213829ee8adbf0759ad3c..00a3abf2adde0fc2e39482ea9b77d509f492705c 100644 (file)
@@ -132,7 +132,7 @@ static int Demux( demux_t *p_demux )
     {
         msg_Err( p_demux, "invalid root node %i, %s",
                  xml_ReaderNodeType( p_xml_reader ), psz_eltname );
-        if( psz_eltname ) free( psz_eltname );
+        free( psz_eltname );
         return -1;
     }
 
index 651c7e0ec8d30b26b72c3e375d10f1a08d84acac..accca9e35fbc1e2177e39adc2f8c986f8c02df1b 100644 (file)
@@ -497,11 +497,10 @@ static inline void ps_psm_destroy( ps_psm_t *p_psm )
 {
     while( p_psm->i_es-- )
     {
-        if( p_psm->es[p_psm->i_es]->i_descriptor )
-            free( p_psm->es[p_psm->i_es]->p_descriptor );
+        free( p_psm->es[p_psm->i_es]->p_descriptor );
         free( p_psm->es[p_psm->i_es] );
     }
-    if( p_psm->es ) free( p_psm->es );
+    free( p_psm->es );
 
     p_psm->es = 0;
     p_psm->i_es = 0;
index 1e814ce1574161b9a205c190216a2df0aa4b26cc..8f382873052533812eb0b8cbdb664de50c10fb79 100644 (file)
@@ -216,10 +216,10 @@ static void Close( vlc_object_t *p_this )
         free( tk );
     }
 
-    if( p_sys->psz_title ) free( p_sys->psz_title );
-    if( p_sys->psz_artist ) free( p_sys->psz_artist );
-    if( p_sys->psz_copyright ) free( p_sys->psz_copyright );
-    if( p_sys->psz_description ) free( p_sys->psz_description );
+    free( p_sys->psz_title );
+    free( p_sys->psz_artist );
+    free( p_sys->psz_copyright );
+    free( p_sys->psz_description );
 
     if( p_sys->i_track > 0 ) free( p_sys->track );
     free( p_sys );
index cee5a824477ccda55b148e249f5cba94d74a36a5..09b2eecf40cb92226937593994ea632c2a44f268 100644 (file)
@@ -323,7 +323,7 @@ static int Open ( vlc_object_t *p_this )
             s = NULL;
         }
 
-        if( s ) free( s );
+        free( s );
 
         /* It will nearly always work even for non seekable stream thanks the
          * caching system, and if it fails we lose just a few sub */
@@ -365,8 +365,7 @@ static int Open ( vlc_object_t *p_this )
                                               sizeof(subtitle_t) * i_max ) ) )
             {
                 msg_Err( p_demux, "out of memory");
-                if( p_sys->subtitle != NULL )
-                    free( p_sys->subtitle );
+                free( p_sys->subtitle );
                 TextUnload( &p_sys->txt );
                 free( p_sys );
                 return VLC_ENOMEM;
@@ -426,12 +425,8 @@ static void Close( vlc_object_t *p_this )
     int i;
 
     for( i = 0; i < p_sys->i_subtitles; i++ )
-    {
-        if( p_sys->subtitle[i].psz_text )
-            free( p_sys->subtitle[i].psz_text );
-    }
-    if( p_sys->subtitle )
-        free( p_sys->subtitle );
+        free( p_sys->subtitle[i].psz_text );
+    free( p_sys->subtitle );
 
     free( p_sys );
 }
index dd3549e2681aa79ebbbc6350c434af08cafff4f3..103972b18b6bc05a08795d70cb4bffe2e7597720 100644 (file)
@@ -692,10 +692,7 @@ static int Open( vlc_object_t *p_this )
             p_sys->buffer = malloc( p_sys->i_packet_size * p_sys->i_ts_read );
         }
     }
-    if( val.psz_string )
-    {
-        free( val.psz_string );
-    }
+    free( val.psz_string );
 
     /* We handle description of an extra PMT */
     var_Create( p_demux, "ts-extra-pmt", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
@@ -773,10 +770,7 @@ static int Open( vlc_object_t *p_this )
             }
         }
     }
-    if( val.psz_string )
-    {
-        free( val.psz_string );
-    }
+    free( val.psz_string );
 
     var_Create( p_demux, "ts-csa-ck", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
     var_Get( p_demux, "ts-csa-ck", &val );
@@ -830,10 +824,7 @@ static int Open( vlc_object_t *p_this )
             }
         }
     }
-    if( val.psz_string )
-    {
-        free( val.psz_string );
-    }
+    free( val.psz_string );
 
     var_Create( p_demux, "ts-silent", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Get( p_demux, "ts-silent", &val );
@@ -1494,7 +1485,7 @@ static void PIDClean( es_out_t *out, ts_pid_t *pid )
                 dvbpsi_DetachPMT( pid->psi->prg[i]->handle );
             free( pid->psi->prg[i] );
         }
-        if( pid->psi->prg ) free( pid->psi->prg );
+        free( pid->psi->prg );
         free( pid->psi );
     }
     else
@@ -2835,10 +2826,8 @@ static void EITCallBack( demux_t *p_demux, dvbpsi_eit_t *p_eit )
                             strcat( psz_extra, psz_itm );
                             strcat( psz_extra, ")" );
                         }
-                        if( psz_dsc )
-                            free( psz_dsc );
-                        if( psz_itm )
-                            free( psz_itm );
+                        free( psz_dsc );
+                        free( psz_itm );
                     }
                 }
             }
@@ -2856,10 +2845,8 @@ static void EITCallBack( demux_t *p_demux, dvbpsi_eit_t *p_eit )
         if( p_evt->i_running_status == 0x04 && i_start > 0 )
             vlc_epg_SetCurrent( p_epg, i_start );
 
-        if( psz_name )
-            free( psz_name );
-        if( psz_text )
-            free( psz_text );
+        free( psz_name );
+        free( psz_text );
 
         free( psz_extra );
     }
@@ -3878,7 +3865,7 @@ static void PATCallBack( demux_t *p_demux, dvbpsi_pat_t *p_pat )
             TAB_REMOVE( p_sys->i_pmt, p_sys->pmt, pmt_rm[i] );
         }
 
-        if( pmt_rm ) free( pmt_rm );
+        free( pmt_rm );
     }
 
     /* now create programs */
index b6d88c593d70d398f072d64cf7451fc2f961504b..b285c81d7806c372ce34e8af1d6301a31bf94120 100644 (file)
@@ -211,10 +211,9 @@ static void Close( vlc_object_t *p_this )
 
     /* Clean all subs from all tracks */
     for( i = 0; i < p_sys->i_tracks; i++ )
-    {
-        if( p_sys->track[i].p_subtitles ) free( p_sys->track[i].p_subtitles );
-    }
-    if( p_sys->track ) free( p_sys->track );
+        free( p_sys->track[i].p_subtitles );
+
+    free( p_sys->track );
 
     if( p_sys->p_vobsub_stream )
         stream_Delete( p_sys->p_vobsub_stream );
@@ -435,7 +434,7 @@ static int TextLoad( text_t *txt, stream_t *s )
 
     if( txt->i_line_count <= 0 )
     {
-        if( txt->line ) free( txt->line );
+        free( txt->line );
         return VLC_EGENERIC;
     }
 
@@ -446,10 +445,9 @@ static void TextUnload( text_t *txt )
     int i;
 
     for( i = 0; i < txt->i_line_count; i++ )
-    {
-        if( txt->line[i] ) free( txt->line[i] );
-    }
-    if( txt->line ) free( txt->line );
+        free( txt->line[i] );
+
+    free( txt->line );
     txt->i_line       = 0;
     txt->i_line_count = 0;
 }