Commit a87158b
committed
syz-ci: fix null dereference when JobManager creation fails, skip when no dashboard
When starting syz-ci, if instantiating the JobManager fails (due to
dashapi.New() returning an error), we log an error and then proceed to go
right ahead and call the startLoop() method with a nil pointer anyway.
Fix this by only calling startLoop() if newJobManager() succeeded.
Additionally, one reason why setting up the JobManager might fail is when
you don't specify a dashboard address, which is an optional field in the
syz-ci config. There's no point having a JobManager without a dashboard,
so just skip this completely when there's no dashboard.
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>1 parent 6bdf333 commit a87158b
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 324 | + | |
328 | 325 | | |
329 | 326 | | |
330 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
| |||
0 commit comments