fix embarassing fileptr leak
This commit is contained in:
parent
b9661ae65d
commit
e426c131c7
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "portab.h"
|
#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.34 2006/09/16 12:22:09 fw Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -910,8 +910,10 @@ IRC_Show_MOTD( CLIENT *Client )
|
||||||
return IRC_WriteStrClient( Client, ERR_NOMOTD_MSG, Client_ID( Client ) );
|
return IRC_WriteStrClient( Client, ERR_NOMOTD_MSG, Client_ID( Client ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Show_MOTD_Start( Client ))
|
if (!Show_MOTD_Start( Client )) {
|
||||||
return DISCONNECTED;
|
fclose(fd);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
while (fgets( line, (int)sizeof line, fd )) {
|
while (fgets( line, (int)sizeof line, fd )) {
|
||||||
ngt_TrimLastChr( line, '\n');
|
ngt_TrimLastChr( line, '\n');
|
||||||
|
|
Loading…
Reference in New Issue