Skip to content

Commit b37fc77

Browse files
committed
Check persist_state_alloc_entry return value
1 parent 43c600d commit b37fc77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ int main(int argc, char** argv) {
109109
break;
110110
case SAVE_JOURNALD_CURSOR:
111111
handle = persist_state_alloc_entry(state, systemd_journal, sizeof(struct journald_state));
112+
if (handle == 0)
113+
break;
112114
journald_state = persist_state_map_entry(state, handle);
113115
journald_state->header.version = 0;
114116
journald_state->header.big_endian = (G_BYTE_ORDER == G_BIG_ENDIAN);

0 commit comments

Comments
 (0)