help flexelint understand what happens with memory

Flexelint sput warning 429 that the malloc() return value was neither
freed not returned.

This simplification makes it clear. The assertion on malloc() having
succeeded is in VSA_Build()

Ref #3275
parent e5341414
......@@ -245,12 +245,7 @@ socklen_t sua_len(const struct sockaddr *sa)
struct suckaddr *
VSA_Malloc(const void *s, unsigned sal)
{
void *d;
d = malloc(vsa_suckaddr_len);
AN(d);
return (VSA_Build(d, s, sal));
return (VSA_Build(malloc(vsa_suckaddr_len), s, sal));
}
/* 'd' SHALL point to vsa_suckaddr_len aligned bytes of storage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment