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:10:17 +0200 |
commit | f049ddb9126195789f61f1127cf2ebaf8fe3950f (patch) | |
tree | 6cc69778cc4f89e223dc2c58515915406d9dcfef | |
parent | 545ff94f4b7adfd46306b5356b19f2ab6597b4ec (diff) |
maketlv() makes a copy of v, so free it.
coverity: 1449503
-rw-r--r-- | radsecproxy.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/radsecproxy.c b/radsecproxy.c index dbb2576..a52f6aa 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -1054,9 +1054,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; |