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 and SCA fixes #17431
Merged
Merged
Coverity and SCA fixes #17431
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
since it isn't used Fix for: CID 1394854 (#1 of 1): 'Constant' variable guards dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: opts->set(RBD_IMAGE_OPTION_.... Local variable features_set_specified is assigned only once, to a constant value, making it effectively constant throughout its scope. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Don't call put_request() twice, it's already called by unregister_request() Fix for: CID 1405360 (#1 of 1): Use after free (USE_AFTER_FREE) deref_arg: Calling put_request dereferences freed pointer request Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
calloc() does not take negative values, check return value from get_max_buckets() and handle it correctly. Fix for: CID 1405301 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS) negative_returns: arg_map.size is passed to a parameter that cannot be negative. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for: CID 1406088 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member root_ancestor is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for: CID 717207 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) uninit_member: Non-static class member dirp is not initialized in this constructor nor in any functions that it calls. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for: CID 1405070 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405071 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405073 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405074 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405075 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405077 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405083 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405086 (#1 of 1): Memset fill value of '0' (NO_EFFECT) CID 1405087 (#1 of 1): Memset fill value of '0' (NO_EFFECT) bad_memset: "memset" with fill value "'0'" (the zero character). memset(&net, 48, 28UL). (CWE-665) Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for: CID 1396232 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR) nonvirtual_dtor: Class librbd::<unnamed>::SafeTimerSingleton has a destructor and a pointer to it is upcast to class SafeTimer which doesn't have a virtual destructor. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for: CID 1402624 (#1 of 1): Uninitialized scalar variable (UNINIT) uninit_use: Using uninitialized value sin. Field sin.sin_zero is uninitialized. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1219593 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable completion going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix for: CID 1313405 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable my_completion2 going out of scope leaks the storage it points to. CID 1219522 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable my_completion going out of scope leaks the storage it points to. CID 1219501 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable my_completion going out of scope leaks the storage it points to. CID 1313406 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable my_completion2 going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Jenkins retest this please |
dillaman
approved these changes
Sep 2, 2017
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.
lgtm
@tchaikov thanks for the work! Totally missed my pull request due to other projects! |
@dalgaaf my pleasure! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.