diff options
author | Linus Nordberg <linus@nordu.net> | 2017-07-30 20:33:47 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-08-01 18:25:07 +0200 |
commit | 2a75a2bb1353acd7b82cd33d3e4c2274b5e753b2 (patch) | |
tree | e34b56d4033fe914c3df230ea54ab5312b42f24a /radsecproxy.c | |
parent | 7a47ecf93bc7ab9a7d9307aa5997f0b98e8e4a5d (diff) |
maketlv() makes a copy of v, so free it.
coverity: 1449503
Diffstat (limited to 'radsecproxy.c')
-rw-r--r-- | radsecproxy.c | 5 |
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; |