Blame SOURCES/libucil-0.9.10-leaks.patch

6983bb
 src/ucil_png.c    |    1 +
6983bb
 src/ucil_rawavi.c |    6 +++++-
6983bb
 2 files changed, 6 insertions(+), 1 deletions(-)
6983bb
6983bb
diff --git a/src/ucil_png.c b/src/ucil_png.c
6983bb
index 9fd9de3..2406ce7 100644
6983bb
--- a/src/ucil_png.c
6983bb
+++ b/src/ucil_png.c
6983bb
@@ -286,6 +286,7 @@ unicap_status_t ucil_load_png( char *filename, unicap_data_buffer_t *buffer )
6983bb
    if( !check_if_png( filename, &f ) )
6983bb
    {
6983bb
       TRACE( "File '%s' is not a valid PNG image\n", filename );
6983bb
+      fclose( f );
6983bb
       return STATUS_FAILURE;
6983bb
    }
6983bb
    
6983bb
diff --git a/src/ucil_rawavi.c b/src/ucil_rawavi.c
6983bb
index d578922..8b6f7b4 100644
6983bb
--- a/src/ucil_rawavi.c
6983bb
+++ b/src/ucil_rawavi.c
6983bb
@@ -225,6 +225,7 @@ static void avi_list_pad( avi_buffer_t *list, int offset, int padding )
6983bb
    padsize = padding - ( ( offset + list->dwPtr + sizeof( avi_list_t ) - 4 ) % padding );
6983bb
    
6983bb
    avi_add_chunk( list, UCIL_FOURCC( 'J', 'U', 'N', 'K' ), padsize, chunk_buffer );
6983bb
+   free( chunk_buffer );
6983bb
 }
6983bb
 
6983bb
 
6983bb
@@ -573,6 +574,7 @@ static avi_buffer_t *ucil_rawavi_create_index( ucil_rawavi_video_file_object_t *
6983bb
    avi_index_entry_t *idx;
6983bb
    int i;
6983bb
    int offset = 4;
6983bb
+   avi_buffer_t *buf;
6983bb
    
6983bb
    idx = malloc( vobj->movi_frames * sizeof( avi_index_entry_t ) );
6983bb
 
6983bb
@@ -586,7 +588,9 @@ static avi_buffer_t *ucil_rawavi_create_index( ucil_rawavi_video_file_object_t *
6983bb
       offset += vobj->format.buffer_size + 8;
6983bb
    }
6983bb
    
6983bb
-   return avi_create_chunk( UCIL_FOURCC( 'i', 'd', 'x', '1' ), idx, vobj->movi_frames * sizeof( avi_index_entry_t ) );   
6983bb
+   buf = avi_create_chunk( UCIL_FOURCC( 'i', 'd', 'x', '1' ), idx, vobj->movi_frames * sizeof( avi_index_entry_t ) );   
6983bb
+   free( idx );
6983bb
+   return buf;
6983bb
 }
6983bb
 
6983bb
 unicap_status_t ucil_rawavi_close_video_file( ucil_rawavi_video_file_object_t *vobj )