-
Notifications
You must be signed in to change notification settings - Fork 4
Update rfc_xconf_handler.cpp #163
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
base: develop
Are you sure you want to change the base?
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.
Pull request overview
This PR updates RFC manager handling in rfc_xconf_handler.cpp, focusing on small cleanups around DB-clear property setting and download error handling.
Changes:
- Updated
clearDB()to passclearValueviastd::movewhen setting TR-181 ClearDB flags. - Removed an unused
curlpointer and its associated cleanup block inDownloadRuntimeFeatutres().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rfcMgr/rfc_xconf_handler.cpp
Outdated
| set_RFCProperty(name, ClearDB, clearValue); | ||
| set_RFCProperty(name, BootstrapClearDB, clearValue); | ||
| set_RFCProperty(name, ClearDB, std::move(clearValue)); | ||
| set_RFCProperty(name, BootstrapClearDB, std::move(clearValue)); |
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.
Coverity issue no longer present as of: undefined
Show issue
Coverity Issue - Using a moved object
"clearValue" is used after it has been already moved.
High Impact, CWE-457
USE_AFTER_MOVE
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rfcMgr/rfc_xconf_handler.cpp
Outdated
| if(file_dwnl.hashData != nullptr) | ||
| { | ||
| free(file_dwnl.hashData); | ||
| hashParam_t* hashData = (hashParam_t*)file_dwnl.hashData; | ||
| if (hashData->hashvalue != NULL) | ||
| { |
Copilot
AI
Jan 30, 2026
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.
file_dwnl.hashData is cleaned up at the end of the function, but there are multiple early return paths above (e.g., cert selector init failure / getMtlscert failures, and the branch where pDwnLoc->pvOut / pHeaderDwnLoc->pvOut are null) that bypass this cleanup and leak hashParam (and its strdup’d members). Consider refactoring to a single exit path (e.g., goto cleanup/RAII) so hashData is freed on all returns.
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.
@copilot open a new pull request to apply changes based on this feedback
|
@Vismalskumar0 I've opened a new pull request, #164, to work on those changes. Once the pull request is ready, I'll request review from you. |
…tern Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
…n cleanup Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Co-authored-by: Vismalskumar0 <188226757+Vismalskumar0@users.noreply.github.com>
Fix memory leak in DownloadRuntimeFeatutres from early return paths
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
No description provided.