Don't leak memory in handling of unjournaled state.
This commit is contained in:
parent
cf0576e6ff
commit
1917e9295c
|
@ -116,6 +116,8 @@ Log_Entry::print ( void ) const
|
|||
|
||||
strcpy( r2, r );
|
||||
|
||||
free( r );
|
||||
|
||||
return r2;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue