mirror of
https://github.com/samba-team/samba.git
synced 2025-02-16 09:57:47 +03:00
Fix a memleak
(This used to be commit 252c3130697d1b7fd34a5225d83cef4f32e663b2)
This commit is contained in:
parent
5dcc7f7e61
commit
cb9029dbf5
@ -148,7 +148,6 @@ bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
|
||||
int nbytes, reclen, len, Retention, MaxSize;
|
||||
int tresv1, trecnum, timegen, timewr;
|
||||
TDB_DATA key, ret;
|
||||
TALLOC_CTX *mem_ctx = NULL;
|
||||
time_t current_time, exp_time;
|
||||
|
||||
/* discard some eventlogs */
|
||||
@ -156,10 +155,7 @@ bool make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed,
|
||||
/* read eventlogs from oldest_entry -- there can't be any discontinuity in recnos,
|
||||
although records not necessarily guaranteed to have successive times */
|
||||
/* */
|
||||
mem_ctx = talloc_init( "make_way_for_eventlogs" ); /* Homage to BPG */
|
||||
|
||||
if ( mem_ctx == NULL )
|
||||
return False; /* can't allocate memory indicates bigger problems */
|
||||
/* lock */
|
||||
tdb_lock_bystring_with_timeout( the_tdb, EVT_NEXT_RECORD, 1 );
|
||||
/* read */
|
||||
|
Loading…
x
Reference in New Issue
Block a user