-
Notifications
You must be signed in to change notification settings - Fork 71
Klocwork check null before dereference in acl_profiler.cpp #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @haoxian2! This one needs a bit more investigation as detailed below.
03f4bb8
to
ccf7254
Compare
|
acl_find_accel_def ensures that the returned value is not NULL.
Thanks @haoxian2 for the detailed explanation and my apologies for missing this the first time, which you had already confirmed in the commit message. |
ccf7254
to
d564f2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @haoxian2. I pushed a minor revision of the commit message, adding a tag in the subject and moving the reasoning to the body to keep the subject brief.
Thanks @pcolberg for the revision! |
Fixed the following Klocwork issue:
acl_find_accl_def
bails out if the return value would be NULL, therefore ensuring thataccel_def
can never be NULL ifstatus == CL_SUCCESS
. So an assert statement is included instead after thestatus
check, which would rule out NULL return values.