Skip to content

Commit

Permalink
fix: fixed the null pointer when an audit error occurred in the audit…
Browse files Browse the repository at this point in the history
… plan
  • Loading branch information
iwanghc committed Dec 18, 2024
1 parent f0bcb90 commit bc71b16
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sqle/server/auditplan/job_task_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ func BatchAuditSQLs(l *logrus.Entry, sqlList []*model.SQLManageRecord) ([]*model
}
}
mu.Lock()
auditedSQLs = append(auditedSQLs, resp.AuditedSqls...)
if resp != nil {
auditedSQLs = append(auditedSQLs, resp.AuditedSqls...)
} else {
auditedSQLs = append(auditedSQLs, sqls...)
}
mu.Unlock()
}(sqls)
}
Expand Down

0 comments on commit bc71b16

Please sign in to comment.