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:
Jani Nikula 2013-11-03 14:24:44 +02:00 committed by David Bremner
parent a95dbba156
commit 35ca5feb28

View file

@ -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