Commit 1fc039cb authored by lefort's avatar lefort
Browse files

Memory leak corrected.

parent 673945a0
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -202,6 +202,8 @@ int main( int argc, char *argv[] )

    nbHRTF = 0;
    hrtf_size_max = 0;
    fileSize = 0;

    for ( i = 0; i < IVAS_NB_RENDERER_TYPE; i++ )
    {
        hrtf_size = 0;
@@ -1087,7 +1089,7 @@ int16_t check_bin_file( FILE *hrtf_bin_file )
        if ( strncmp( file_header_rptr, file_identifier, file_identifier_len ) != 0 )
        {
            free( file_header );
            return 1;
            return -1;
        }
        file_header_rptr += file_identifier_len;

@@ -1096,7 +1098,7 @@ int16_t check_bin_file( FILE *hrtf_bin_file )
        if ( ctrlFileSize != fileSize )
        {
            free( file_header );
            return 2;
            return -1;
        }
        file_header_rptr += sizeof( int32_t );

@@ -1128,7 +1130,7 @@ int16_t check_bin_file( FILE *hrtf_bin_file )
            {
                fprintf( stderr, "Bad header data size!\n\n" );
                free( file_header );
                return 2;
                return -1;
            }
#else
        // Header [Declaration of the HRTF]
@@ -1172,6 +1174,9 @@ int16_t check_bin_file( FILE *hrtf_bin_file )
                return -1;
            }
        }

        if (file_header != NULL)
            free( file_header );
    }
    else
    {