#31 file descriptor not closed in getifaddrs()

CVS snapshot
closed
nobody
None
5
2005-07-16
2005-06-29
Anonymous
No

In file src/racoon/grabmyaddr.c, function getifaddrs(),
the last open socket is never closed.

I had a problem with a PPPoE provider and racoon would
exit (running out of file descriptors) after a couple
of hours has each time pppd would try to open the PPPoE
session, a new file descriptor would leak.

Adding a close(fd); just before the last return 0;
fixed the problem I had.

I can provide the fix as a patch if you prefer.

Discussion

  • Patrice Fournier

    Logged In: YES
    user_id=92586

    Seems sf.net logged me out when I sent the report... I'm the
    one which sent this report if you need more info.

     
  • Aidas Kasparas

    Aidas Kasparas - 2005-07-16

    Logged In: YES
    user_id=39627

    Fix commited to CVS (0.6 and HEAD). Thanks Patrice.

     
  • Aidas Kasparas

    Aidas Kasparas - 2005-07-16
    • status: open --> closed
     

Log in to post a comment.