iovw: add simpler iovw_done() destructor

This commit is contained in:
Lennart Poettering
2024-10-31 23:08:11 +01:00
parent 2865561eaa
commit 811aa36ab6
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ void journal_importer_cleanup(JournalImporter *imp) {
free(imp->name);
free(imp->buf);
iovw_free_contents(&imp->iovw, false);
iovw_done(&imp->iovw);
}
static char* realloc_buffer(JournalImporter *imp, size_t size) {
@@ -452,7 +452,7 @@ void journal_importer_drop_iovw(JournalImporter *imp) {
/* This function drops processed data that along with the iovw that points at it */
iovw_free_contents(&imp->iovw, false);
iovw_done(&imp->iovw);
/* possibly reset buffer position */
remain = imp->filled - imp->offset;