Blame SOURCES/libucil-0.9.10-leaks.patch

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