mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-26 17:25:34 +03:00
bootchart: add assert
since 376cd3b89c
LIST_FIND_TAIL accepts
an empty list. That removed an assert in LIST_FIND_TAIL and we now
theoretically risk a null pointer deref. This adds the assert directly
to protect against that.
This commit is contained in:
parent
a035f8191a
commit
8271bd16ce
@ -80,6 +80,8 @@ static void svg_header(void) {
|
||||
double h;
|
||||
struct list_sample_data *sampledata_last;
|
||||
|
||||
assert(head);
|
||||
|
||||
sampledata = head;
|
||||
LIST_FIND_TAIL(link, sampledata, head);
|
||||
sampledata_last = head;
|
||||
|
Loading…
Reference in New Issue
Block a user