Skip to content

Commit

Permalink
maketlv() makes a copy of v, so free it.
Browse files Browse the repository at this point in the history
coverity: 1449503
  • Loading branch information
Linus Nordberg committed Aug 1, 2017
1 parent 7a47ecf commit 2a75a2b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions radsecproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2a75a2b

Please sign in to comment.