Skip to content
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

client: trim_caps() do not dereference cap if it's removed #12145

Merged
merged 1 commit into from Nov 23, 2016

Conversation

tchaikov
Copy link
Contributor

this silences the warning of "Use of memory after it is freed" reported
by clang static analyzer.

Reported-by: Brad Hubbard bhubbard@redhat.com
Signed-off-by: Kefu Chai kchai@redhat.com

this silences the warning of "Use of memory after it is freed" reported
by clang static analyzer.

Reported-by: Brad Hubbard <bhubbard@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov added bug-fix cephfs Ceph File System labels Nov 23, 2016
@tchaikov tchaikov assigned jcsp, ukernel and badone and unassigned jcsp and ukernel Nov 23, 2016
Copy link
Contributor

@badone badone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@badone badone merged commit e16c645 into ceph:master Nov 23, 2016
@tchaikov tchaikov deleted the wip-client-use-after-freed branch November 23, 2016 06:10
@jcsp
Copy link
Contributor

jcsp commented Nov 23, 2016

In general I'm not too keen on changes that add complexity to satisfy a static analyser -- I think there's a simpler way to clean this up #12161

@gregsfortytwo
Copy link
Member

Oh, this really is just to make the static analyzer happy, too — note the session->s_cap_iterator which is set and checked to prevent exactly the static analyzer's concern. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix cephfs Ceph File System
Projects
None yet
5 participants