• Xiaotian Feng's avatar
    x86, pat: Fix memory leak in free_memtype · 20413f27
    Xiaotian Feng authored
    Reserve_memtype will allocate memory for new memtype, but
    in free_memtype, after the memtype erased from rbtree, the
    memory is not freed.
    
    Changes since V1:
    	make rbt_memtype_erase return erased memtype so that
    	it can be freed in free_memtype.
    
    [ hpa: not for -stable: 2.6.34 and earlier not affected ]
    Signed-off-by: default avatarXiaotian Feng <dfeng@redhat.com>
    LKML-Reference: <1274838670-8731-1-git-send-email-dfeng@redhat.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
    Cc: Jack Steiner <steiner@sgi.com>
    Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
    Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
    20413f27
pat_rbtree.c 6.24 KB