ia64/xen-unstable

changeset 1067:d25e0e228b40

bitkeeper revision 1.704.1.1 (40228cfbFm26RadJ82AzDzKcLMAkxg)

fix bugs that lead to memory leak
author br260@labyrinth.cl.cam.ac.uk
date Thu Feb 05 18:35:39 2004 +0000 (2004-02-05)
parents 9acedaeb47e2
children 3de90982de3f
files tools/xc/lib/xc_linux_build.c
line diff
     1.1 --- a/tools/xc/lib/xc_linux_build.c	Wed Feb 04 21:48:17 2004 +0000
     1.2 +++ b/tools/xc/lib/xc_linux_build.c	Thu Feb 05 18:35:39 2004 +0000
     1.3 @@ -304,9 +304,9 @@ static int setup_guestos(int xc_handle,
     1.4   error_out:
     1.5      if ( pm_handle >= 0 )
     1.6          (void)close_pfn_mapper(pm_handle);
     1.7 -    if ( page_array == NULL )
     1.8 +    if ( page_array )
     1.9          free(page_array);
    1.10 -    if ( pgt_update_arr == NULL )
    1.11 +    if ( pgt_update_arr )
    1.12          free(pgt_update_arr);
    1.13      return -1;
    1.14  }