mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-23 01:44:52 +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;
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
notmuch_database_close(notmuch);
|
|
||||||
|
|
||||||
DONE:
|
DONE:
|
||||||
|
if (notmuch)
|
||||||
|
notmuch_database_destroy (notmuch);
|
||||||
|
|
||||||
talloc_free(local);
|
talloc_free(local);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue