mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
lib: do not leak the database in compaction
Destroy instead of close the database after compaction, and also on error path, to not leak the database.
This commit is contained in:
parent
a95dbba156
commit
35ca5feb28
1 changed files with 4 additions and 2 deletions
|
@ -941,10 +941,12 @@ notmuch_database_compact (const char* path,
|
|||
goto DONE;
|
||||
}
|
||||
|
||||
notmuch_database_close(notmuch);
|
||||
|
||||
DONE:
|
||||
if (notmuch)
|
||||
notmuch_database_destroy (notmuch);
|
||||
|
||||
talloc_free(local);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue