Work around for bug #35.
authorAlan T. DeKok <aland@freeradius.org>
Mon, 26 Apr 2010 15:24:41 +0000 (17:24 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 29 Apr 2010 08:19:13 +0000 (10:19 +0200)
The packet is apparently getting freed when the request structure is still
in the list.  Since it's hard to tell when / why this is happening,
the short-term fix is to work around it.

It's better to leak memory slowly than to crash quickly.

src/lib/packet.c

index 095f406..15d5bc9 100644 (file)
@@ -512,6 +512,8 @@ static int packet_entry_cmp(const void *one, const void *two)
        const RADIUS_PACKET * const *a = one;
        const RADIUS_PACKET * const *b = two;
 
+       if (!a || !*a || !b || !*b) return -1; /* work-around for bug #35 */
+
        return fr_packet_cmp(*a, *b);
 }