-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Coverity fixes v2 #7138
Coverity fixes v2 #7138
Conversation
Even if the code seems unreachable for now
Coverity ID: 1502953 As we check just on the next line my_pool against NULL, we should not dereference it, even for debug validation
Information:
Pipeline 6573 |
Codecov Report
@@ Coverage Diff @@
## master #7138 +/- ##
==========================================
+ Coverage 78.06% 78.15% +0.08%
==========================================
Files 628 628
Lines 185266 185268 +2
==========================================
+ Hits 144635 144787 +152
+ Misses 40631 40481 -150
Flags with carried forward coverage won't be shown. Click here to find out more. |
CI failure seems unrelated |
@@ -813,6 +813,9 @@ Flow *FlowGetFlowFromHash(ThreadVars *tv, FlowLookupStruct *fls, | |||
if (f->use_cnt == 0) { | |||
if (prev_f == NULL) /* if we have no prev it means new_f is now our prev */ | |||
prev_f = new_f; | |||
// f got unlocked by TcpReuseReplace and will be unlocked again by | |||
// MoveToWorkQueue | |||
FromHashLockCMP(f); |
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.
I think I prefer not unlocking the old flow in TcpReuseReplace
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.
Right
Replaced by #7169 |
Merged all but the flow commit in #7172, thanks! |
Link to redmine ticket:
None, not sure it deserves one
Describe changes: patches to make coverity happy
PKT_IS_IPV6
orPKT_IS_IPV4
)PacketPoolDestroy
After this and #7131 (which I think is a real bug this one), there will be no more outstanding issues reported by coverity
Replaces #7132 with review taken into account + new bug found by coverity meanwhile