Commit 402f4377 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Close the open user.dat upon (unlikely/impossible) malloc error

parent e731ac18
Pipeline #3073 passed with stage
in 9 minutes and 54 seconds
......@@ -76,6 +76,7 @@ void sbbs_t::userlist(long mode)
}
if(sort) {
if((line[j]=(char *)malloc(128))==0) {
closeuserdat(userfile);
errormsg(WHERE,ERR_ALLOC,nulstr,83);
for(i=0;i<j;i++)
free(line[i]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment