Skip to content

Commit c9f5ac0

Browse files
committed
sd-journal: check retval of sd_id128_from_string call
Fixes: CID#1469712 CID 1469712 (#1 of 1): Unused value (UNUSED_VALUE) returned_value: Assigning value from sd_id128_from_string(word + 2, &boot_id) to r here, but that stored value is overwritten before it can be used.
1 parent 2f4ad53 commit c9f5ac0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libsystemd/sd-journal/sd-journal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,8 @@ _public_ int sd_journal_seek_cursor(sd_journal *j, const char *cursor) {
987987
case 'b':
988988
boot_id_set = true;
989989
r = sd_id128_from_string(word + 2, &boot_id);
990+
if (r < 0)
991+
return r;
990992
break;
991993

992994
case 'm':

0 commit comments

Comments
 (0)