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:33:22 +0000 (17:33 +0200)
commit6a26b152867ae8a8e88948b86f7409eacd4adc07
tree6f7382bf2368dfc399a91b984b6d18c675f2a333
parentc738b3961158a271f83f3e22688cb7f3d12d086d
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