From: Alan T. DeKok Date: Thu, 6 Sep 2012 08:57:53 +0000 (+0200) Subject: Fix use after free. Bug found by Coverity X-Git-Tag: release_3_0_0_beta0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba5ef9282ccc837bbbe86ca2cd13488d24f942c1;p=thirdparty%2Ffreeradius-server.git Fix use after free. Bug found by Coverity --- diff --git a/src/lib/valuepair.c b/src/lib/valuepair.c index 965d107e599..e5f2d9d3ad1 100644 --- a/src/lib/valuepair.c +++ b/src/lib/valuepair.c @@ -958,8 +958,8 @@ VALUE_PAIR *pairparsevalue(VALUE_PAIR *vp, const char *value) fr_ipaddr_t ipaddr; if (ip_hton(cs, AF_INET, &ipaddr) < 0) { - free(s); fr_strerror_printf("Failed to find IP address for %s", cs); + free(s); return NULL; }