sd-journal: make journal_file_copy_entry() return earlier

This commit is contained in:
Yu Watanabe
2023-04-26 20:54:08 +09:00
parent bf9b7728e6
commit 85e38da2ec
+2
View File
@@ -4188,6 +4188,8 @@ int journal_file_copy_entry(
boot_id = o->entry.boot_id;
n = journal_file_entry_n_items(from, o);
if (n == 0)
return 0;
if (n < ALLOCA_MAX / sizeof(EntryItem) / 2)
items = newa(EntryItem, n);