mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
shada: Free wms->hms in shada_write_exit
Otherwise there should be memory leak.
This commit is contained in:
parent
ea67bf808b
commit
5c112c0cb9
@ -2918,7 +2918,6 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
|
||||
break;
|
||||
}
|
||||
})
|
||||
hms_dealloc(&wms->hms[i]);
|
||||
if (ret == kSDWriteFailed) {
|
||||
goto shada_write_exit;
|
||||
}
|
||||
@ -2927,6 +2926,11 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
|
||||
}
|
||||
|
||||
shada_write_exit:
|
||||
for (size_t i = 0; i < HIST_COUNT; i++) {
|
||||
if (dump_one_history[i]) {
|
||||
hms_dealloc(&wms->hms[i]);
|
||||
}
|
||||
}
|
||||
kh_dealloc(file_marks, &wms->file_marks);
|
||||
kh_dealloc(bufset, &removable_bufs);
|
||||
msgpack_packer_free(packer);
|
||||
|
Loading…
Reference in New Issue
Block a user