Fix long-standing memory leak as found by Jerry Nichols
authorAlan T. DeKok <aland@freeradius.org>
Fri, 16 Jul 2010 15:30:24 +0000 (17:30 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 16 Jul 2010 15:30:24 +0000 (17:30 +0200)
commite9c162929f8ab55814033940e7b7cb9e9a4199d6
treeb804d32072c36ce681d1bca4ff604dbe4ff3c47d
parent5eb7302e3880d001911178dce7a136ba5e0c7bc7
Fix long-standing memory leak as found by Jerry Nichols

bob Cleartext-Password := "hello"
Tunnel-Server-Endpoint := 1.2.3.4,
        Tunnel-Server-Endpoint := 1.2.3.5,
        Tunnel-Type            := 3,
        Tunnel-Server-Endpoint := 1.2.3.2,
        Tunnel-Medium-Type     := 1,
        Tunnel-Server-Endpoint := 1.2.3.1

Where there are multiple copies of
the same attribute with a := operator in the 'from' list, and the only
operators in the 'from' list are :=, then all the repeated attributes
after the first and before the last non-repeated attribute are lost. In
the example above that would result in the VALUE_PAIRS :

        Tunnel-Server-Endpoint := 1.2.3.5
        Tunnel-Server-Endpoint := 1.2.3.2

being orphaned.
src/main/valuepair.c