[patch] file descriptor leak fix

2010-03-21 Thread Igor Zinovik
Hello, tech@ Following diff fixes file descriptor leak `ifd'. Index: diffreg.c === RCS file: /cvs/src/usr.bin/diff/diffreg.c,v retrieving revision 1.73 diff -u -r1.73 diffreg.c --- diffreg.c 27 Oct 2009 23:59:37 -

Re: [patch] file descriptor leak fix

2010-03-21 Thread Ingo Schwarze
The leak reported by Igor is in opentemp(). The only place opentemp() is called from is diffreg(). When diffreg() is called from main(), the only calls that follow are print_status() and exit(), so we do not really leak anything: opentemp() leaks ifd, returns NULL, diffreg() returns, main()