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

fixbug memory leak #271

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open

fixbug memory leak #271

wants to merge 1 commit into from

Conversation

riweirui
Copy link

No description provided.

Copy link
Collaborator

@dang dang left a comment

Choose a reason for hiding this comment

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

Can you please update the commit message to explain the leak? This code is standard refcounting code, and the change is an odd one.

@chengmao2010
Copy link

Can you please update the commit message to explain the leak? This code is standard refcounting code, and the change is an odd one.

Uio reference not increase after call XDR_PUTBYTES,so uio will never be freed

Copy link
Member

@ffilz ffilz left a comment

Choose a reason for hiding this comment

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

This also needs more commit message than "fixbug memory leak"

}
if (uio->uio_references == 0){
uio->uio_references = 1;
}
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment here explaining because otherwise that code looks really odd.

__warnx(TIRPC_DEBUG_FLAG_ERROR,
"%s() memory leak, unexpected or no release flags (%u)\n",
__func__, uio->uio_flags);
abort();
Copy link
Member

Choose a reason for hiding this comment

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

Please fix the indentation on this block

@ffilz ffilz mentioned this pull request Nov 9, 2023
@ffilz
Copy link
Member

ffilz commented May 14, 2024

Can you please update the commit message to explain the leak? This code is standard refcounting code, and the change is an odd one.

Uio reference not increase after call XDR_PUTBYTES,so uio will never be freed

Should we actually make a change there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants