Don't leak memory in handling of unjournaled state.

This commit is contained in:
Jonathan Moore Liles 2009-01-11 22:33:10 -06:00
parent cf0576e6ff
commit 1917e9295c
2 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,8 @@ Log_Entry::print ( void ) const
strcpy( r2, r );
free( r );
return r2;
}

View File

@ -697,8 +697,11 @@ Loggable::record_unjournaled ( void ) const
if ( e->size() )
_loggables[ _id ].unjournaled_state = e;
else
{
/* don't waste space on loggables with no unjournaled properties */
_loggables[ _id ].unjournaled_state = NULL;
delete e;
}
}
/** Log object destruction. *Must* be called at the beginning of the