commit 7c7d417fd222177458b63e354d4780cdbbbb6a44 from: Alexander Barton date: Sat Sep 16 13:49:15 2006 UTC Fix file handle leak [from HEAD]. commit - ed71217b31358726981d043c861a2de9a592199b commit + 7c7d417fd222177458b63e354d4780cdbbbb6a44 blob - 37afbd3c8da11e9fbf7fdc5e146dfe1a12d49abe blob + b43ab3bfcd101482dc0d83114364de30030a7c60 --- src/ngircd/irc-info.c +++ src/ngircd/irc-info.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: irc-info.c,v 1.33 2006/05/10 21:24:01 alex Exp $"; +static char UNUSED id[] = "$Id: irc-info.c,v 1.33.2.1 2006/09/16 13:49:15 alex Exp $"; #include "imp.h" #include @@ -910,8 +910,10 @@ IRC_Show_MOTD( CLIENT *Client ) return IRC_WriteStrClient( Client, ERR_NOMOTD_MSG, Client_ID( Client ) ); } - if (!Show_MOTD_Start( Client )) - return DISCONNECTED; + if (!Show_MOTD_Start( Client )) { + fclose(fd); + return false; + } while (fgets( line, (int)sizeof line, fd )) { ngt_TrimLastChr( line, '\n');