-
Notifications
You must be signed in to change notification settings - Fork 49
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
base: next
Are you sure you want to change the base?
fixbug memory leak #271
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.
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 |
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.
This also needs more commit message than "fixbug memory leak"
} | ||
if (uio->uio_references == 0){ | ||
uio->uio_references = 1; | ||
} |
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.
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(); |
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.
Please fix the indentation on this block
Should we actually make a change there? |
No description provided.