From 2a75a2bb1353acd7b82cd33d3e4c2274b5e753b2 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sun, 30 Jul 2017 20:33:47 +0200 Subject: maketlv() makes a copy of v, so free it. coverity: 1449503 --- radsecproxy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radsecproxy.c b/radsecproxy.c index 58c4bc6..3a9c706 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1127,9 +1127,8 @@ makevendortlv(uint32_t vendor, struct tlv *attr) tlv2buf(v + 4, attr); v[5] += 2; /* Vendor length increased for type and length fields. */ newtlv = maketlv(RAD_Attr_Vendor_Specific, l, v); - if (newtlv == NULL) - free(v); - else + free(v); + if (newtlv) freetlv(attr); } return newtlv; -- cgit v1.1