Changeset 4974f83a76238faa404e105fd077a1e1af4ce6fd

Show
Ignore:
Timestamp:
25/09/05 19:06:08 (3 years ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1127667968 +0000
git-parent:

[036c9c52326be9a14c439ffe5b7e04861779a31d]

git-author:
Jean-Paul Saman <jpsaman@videolan.org> 1127667968 +0000
Message:

Another bunch of memory leaks in realrtsp plugin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/rtsp/real_sdpplin.c

    r0c2787f r4974f83  
    316316            memcpy(buf, data, len+1); 
    317317            buf[len]=0; 
    318         printf("libreal: sdpplin: not handled: '%s'\n", buf); 
     318            printf("libreal: sdpplin: not handled: '%s'\n", buf); 
    319319#endif 
    320320            data=nl(data); 
     
    329329void sdpplin_free(sdpplin_t *description) 
    330330{ 
    331   /* TODO: free strings */ 
    332   free(description); 
    333 
     331    int i; 
     332 
     333    if( !description ) return; 
     334 
     335    for( i=0; i<description->stream_count; i++ ) 
     336    { 
     337        if( description->stream[i] ) 
     338        { 
     339            if( description->stream[i]->id ) free( description->stream[i]->id ); 
     340            if( description->stream[i]->bandwidth ) free( description->stream[i]->bandwidth ); 
     341            if( description->stream[i]->range ) free( description->stream[i]->range ); 
     342            if( description->stream[i]->length ) free( description->stream[i]->length ); 
     343            if( description->stream[i]->rtpmap ) free( description->stream[i]->rtpmap ); 
     344            if( description->stream[i]->mimetype ) free( description->stream[i]->mimetype ); 
     345            if( description->stream[i]->stream_name ) free( description->stream[i]->stream_name ); 
     346            if( description->stream[i]->mime_type ) free( description->stream[i]->mime_type ); 
     347            if( description->stream[i]->mlti_data ) free( description->stream[i]->mlti_data ); 
     348            if( description->stream[i]->rmff_flags ) free( description->stream[i]->rmff_flags ); 
     349            if( description->stream[i]->asm_rule_book ) free( description->stream[i]->asm_rule_book ); 
     350        } 
     351    } 
     352    free( description->stream ); 
     353 
     354    if( description->owner ) free( description->owner ); 
     355    if( description->session_name ) free( description->session_name ); 
     356    if( description->session_info ) free( description->session_info ); 
     357    if( description->uri ) free( description->uri ); 
     358    if( description->email ) free( description->email ); 
     359    if( description->phone ) free( description->phone ); 
     360    if( description->connection ) free( description->connection ); 
     361    if( description->bandwidth ) free( description->bandwidth ); 
     362    if( description->title ) free( description->title ); 
     363    if( description->author ) free( description->author ); 
     364    if( description->copyright ) free( description->copyright ); 
     365    if( description->keywords ) free( description->keywords ); 
     366    if( description->asm_rule_book ) free( description->asm_rule_book ); 
     367    if( description->abstract ) free( description->abstract ); 
     368    if( description->range ) free( description->range ); 
     369    free(description); 
     370