Fix file descriptor leak in read_scores() found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@251 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -362,8 +362,8 @@ srec *read_scores()
|
|||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
else if (!p)
|
else if (!p)
|
||||||
{
|
{
|
||||||
return tmp2;
|
|
||||||
fclose(sf);
|
fclose(sf);
|
||||||
|
return tmp2;
|
||||||
}
|
}
|
||||||
tmp->nick = (char *)new_malloc(strlen(buff+1));
|
tmp->nick = (char *)new_malloc(strlen(buff+1));
|
||||||
strcpy(tmp->nick, buff);
|
strcpy(tmp->nick, buff);
|
||||||
|
|||||||
Reference in New Issue
Block a user