forked from Telodendria/Telodendria
Fix memory leak in DbDelete()
This commit is contained in:
parent
1a43ea6470
commit
fbd7bf5944
3 changed files with 12 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
.Dd $Mdocdate: December 24 2022 $
|
||||
.Dd $Mdocdate: December 28 2022 $
|
||||
.Dt TELODENDRIA-CHANGELOG 7
|
||||
.Os Telodendria Project
|
||||
.Sh NAME
|
||||
|
@ -101,6 +101,9 @@ safer ones.
|
|||
.It
|
||||
Fixed a memory leak that would occur when closing a
|
||||
database that contains cached objects.
|
||||
.It
|
||||
Fixed a memory leak that would occur when deleting database
|
||||
objects.
|
||||
.El
|
||||
.Pp
|
||||
Misc:
|
||||
|
|
|
@ -111,9 +111,9 @@ CronThread(void *args)
|
|||
const unsigned long microTick = 100;
|
||||
unsigned long remainingTick = cron->tick - (te - ts);
|
||||
|
||||
/* Only sleep for microTick ms at a time because if the
|
||||
* job scheduler is supposed to stop before the tick is up,
|
||||
* we don't want to be stuck in a long sleep */
|
||||
/* Only sleep for microTick ms at a time because if the job
|
||||
* scheduler is supposed to stop before the tick is up, we
|
||||
* don't want to be stuck in a long sleep */
|
||||
while (remainingTick >= microTick && !cron->stop)
|
||||
{
|
||||
UtilSleepMillis(microTick);
|
||||
|
|
2
src/Db.c
2
src/Db.c
|
@ -662,6 +662,8 @@ DbDelete(Db * db, size_t nArgs,...)
|
|||
|
||||
pthread_mutex_unlock(&db->lock);
|
||||
|
||||
ArrayFree(args);
|
||||
Free(file);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue