Skip to content

eBPF-based security platform

report: tolerate a NULL report when recording the verifier log

Daniel Borkmannc6cab993bf90
diff --git a/util/report.c b/util/report.c
index 3c96fdf7..dc98e127 100644
--- a/util/report.c
+++ b/util/report.c
@@ -104,6 +104,8 @@ int shirudo_report_emit(const char *path, const struct shirudo_op_report *r)
void shirudo_report_set_log(struct shirudo_op_report *r, const char *log)
{
+ if (!r)
+ return;
xstrfree(r->verifier_log);
r->verifier_log = NULL;
if (!log || !*log)