summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c5
1 files 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;