nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Updates to nmh

2009-01-16 10:15:09
Ken Hornstein <kenh(_at_)cmf(_dot_)nrl(_dot_)navy(_dot_)mil> writes:

- All networking calls now converted to new APIs
  (getaddrinfo(), sockaddr_storage, and the like).

I only took a quick glance, but I think there may be some issues
with freeaddrinfo() use.  For example, in sbr/client.c client() a
NULL pointer can be passed to freeaddrinfo().  That doesn't work
on a lot of platforms.  Second, it seems memory is being leaked
in that function if you get a result set from getaddrinfo(), but
fail to connect and then call getaddrinfo() again with a
different host.

Additionally, I don't know if you can assume that res will be set
to NULL if getaddrinfo() fails.  Since the spec doesn't specify,
I figure it could be in any state on error:  NULL, never changed,
or pointing at a result set.

-- 
dsp


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>