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_2_2_0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64666035a7450b3641dfb2bb42da1d7894bbf812;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 82cead0ce61..d854918eeda 100644 --- a/src/lib/valuepair.c +++ b/src/lib/valuepair.c @@ -978,8 +978,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; }