Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Sogou, Bing

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
626
UnaMcGlinn
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] free_ban performs doubl...
Forum Rules | Mark all | Recent Posts

[Bug] free_ban performs double free on the ban_time member
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 23, 2005, 6:07 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: free_ban performs double free on the ban_time member
Danger: Trivial - Unnecessary double call to DISPOSE.
Found by: GatewaySysop
Fixed by: GatewaySysop

---

ban.c, free_ban

Locate:
void free_ban( BAN_DATA * pban )
{
   if( pban->name )
      DISPOSE( pban->name );
   if( pban->ban_time )
      DISPOSE( pban->ban_time );
   if( pban->note )
      STRFREE( pban->note );
   if( pban->ban_by )
      DISPOSE( pban->ban_by );
   if( pban->ban_time )
      DISPOSE( pban->ban_time );
   DISPOSE( pban );
}


Remove the second call to DISPOSE pban->ban_time, and the ifcheck immediately above it.

This error has no real harm since ban_time will have already been freed and made NULL by the first DISPOSE call. The second attempt to free it can't happen since it's been checked to see if it's NULL first.
       
Pages:<< prev 1 next >>