another possible mem leak, AIX-specific

Chris Vaughan vaughan99 at yahoo.com
Sat Dec 30 09:10:06 EST 2000


On AIX, the config.h generated by 'configure' sets up
the following directives:

#define HAVE_FREEADDRINFO 1
#define HAVE_GETADDRINFO 1
#define BROKEN_GETADDRINFO 1

This allows the compiler to use the 'getaddrinfo()'
routine in fake-getaddrinfo.c, but it uses the
'freeaddrinfo()' provided by AIX.  I don't think
'freeaddrinfo()' is releasing the linked list
properly, because I think I'm seeing a memory leak
roughly a multiple of the struct size per new channel.
 If I undefine HAVE_FREEADDRINFO in config.h, the
memory leak seems to go away.

I would solve this by having a 'BROKEN_FREEADDRINFO'
flag defined for AIX, and use the same logic as when
'BROKEN_GETADDRINFO' is defined.  That way, the
'freeaddrinfo()' routine from fake-getaddrinfo.c is
used, as opposed to the one from AIX.

- chrisv



=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Chris Vaughan    | "I love deadlines.  I like the
                     |  swooshing sound as they fly by."
 vaughan99 at yahoo.com |   - Douglas Adams

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/





More information about the openssh-unix-dev mailing list