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:
Tim Cava
2013-06-28 07:34:06 +00:00
parent ee761e7f02
commit c464efa90e

View File

@@ -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);