Conversation
There was a problem hiding this comment.
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.
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 <[email protected]>
There was a problem hiding this comment.
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 <[email protected]>
There was a problem hiding this comment.
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) | ||
| { |
There was a problem hiding this comment.
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.
@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 <[email protected]>
…n cleanup Co-authored-by: Vismalskumar0 <[email protected]>
Co-authored-by: Vismalskumar0 <[email protected]>
Co-authored-by: Vismalskumar0 <[email protected]>
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.