show_file

Posted by Boborak on Thu 16 Jan 2003 11:06 PM — 3 posts, 12,820 views.

USA #0
I did a quick search of the forums and didn't see it posted and I'm sure it's been pointed out elsewhere, bu it appears there is a minor 'descriptor' leak in show_file in stock smaug in db.c. The file is opened but never closed.

...
send_to_pager( buf, ch );
num = 0;
}
}
}

should be

...
send_to_pager( buf, ch );
num = 0;
}
fclose(fp);
}
}

Again.. probably mentioned here before, but I'll just point it out again ;-)
Australia Forum Administrator #1
Seems to be fixed in the current source, but thanks for pointing it out.
USA #2
Yea. I've noticed that too. It seems to be present in anything older then the most recent copy. I've also noticed a post about it on the SML so I'm sure the SMAUG developers have long ago fixed it in their releases. SWR1.0 also seems to be a victim of it.