-
Notifications
You must be signed in to change notification settings - Fork 1
RDK-56115 - Fix coverity issues in RRD [High] #103
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
|
src/rrdIarmEvents.c
Outdated
@@ -252,6 +252,7 @@ void _rdmManagerEventHandler(const char *owner, IARM_EventId_t eventId, void *da | |||
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "[%s:%d]: Invalid Owner Name found %s, use IARM_BUS_RDMMGR_NAME!!! \n", __FUNCTION__, __LINE__, owner); | |||
} | |||
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Exiting...\n", __FUNCTION__, __LINE__); | |||
free(sendbuf); |
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 - Uninitialized pointer read
Using uninitialized value "sendbuf" when calling "free".
High Impact, CWE-457
UNINIT
src/rrdJsonParser.c
Outdated
@@ -553,6 +554,7 @@ void checkIssueNodeInfo(issueNodeData *issuestructNode, cJSON *jsoncfg, data_buf | |||
RDK_LOG(RDK_LOG_ERROR,LOG_REMDEBUG,"[%s:%d]: No Command excuted as RRD Failed to change directory:%s\n",__FUNCTION__,__LINE__,outdir); | |||
} | |||
} | |||
free(rfcbuf); //CID 320504: Resource leak (RESOURCE_LEAK) |
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 - Double free
Calling "free" frees pointer "rfcbuf" which has already been freed.
High Impact, CWE-415
USE_AFTER_FREE
src/rrdIarmEvents.c
Outdated
@@ -252,6 +252,7 @@ void _rdmManagerEventHandler(const char *owner, IARM_EventId_t eventId, void *da | |||
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "[%s:%d]: Invalid Owner Name found %s, use IARM_BUS_RDMMGR_NAME!!! \n", __FUNCTION__, __LINE__, owner); | |||
} | |||
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Exiting...\n", __FUNCTION__, __LINE__); | |||
free(sendbuf); //CID 328981: Resource leak (RESOURCE_LEAK) |
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 - Uninitialized pointer read
Using uninitialized value "sendbuf" when calling "free".
High Impact, CWE-457
UNINIT
src/rrdJsonParser.c
Outdated
@@ -553,6 +554,10 @@ void checkIssueNodeInfo(issueNodeData *issuestructNode, cJSON *jsoncfg, data_buf | |||
RDK_LOG(RDK_LOG_ERROR,LOG_REMDEBUG,"[%s:%d]: No Command excuted as RRD Failed to change directory:%s\n",__FUNCTION__,__LINE__,outdir); | |||
} | |||
} | |||
if( rfcbuf != NULL ) | |||
{ | |||
free(rfcbuf); //CID 320504: Resource leak (RESOURCE_LEAK) |
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 - Double free
Calling "free" frees pointer "rfcbuf" which has already been freed.
High Impact, CWE-415
USE_AFTER_FREE
src/rrdEventProcess.c
Outdated
@@ -493,6 +502,10 @@ static void processIssueTypeInInstalledPackage(data_buf *rbuf, issueNodeData *pI | |||
freeParsedJson(jsonParsed); | |||
|
|||
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Exiting...\n", __FUNCTION__, __LINE__); | |||
if( dynJSONPath ) | |||
{ | |||
free(dynJSONPath); |
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 - Double free
Calling "free" frees pointer "dynJSONPath" which has already been freed.
High Impact, CWE-415
USE_AFTER_FREE
src/rrdEventProcess.c
Outdated
@@ -110,7 +110,8 @@ void processIssueTypeEvent(data_buf *rbuf) | |||
} | |||
|
|||
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Exiting...\n", __FUNCTION__, __LINE__); | |||
return; | |||
free(cmdMap); |
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 - Uninitialized pointer read
Using uninitialized value "cmdMap" when calling "free".
High Impact, CWE-457
UNINIT
src/rrdEventProcess.c
Outdated
@@ -110,7 +110,8 @@ | |||
} | |||
|
|||
RDK_LOG(RDK_LOG_DEBUG, LOG_REMDEBUG, "[%s:%d]: ...Exiting...\n", __FUNCTION__, __LINE__); | |||
return; | |||
free(cmdMap); |
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 - Double free
Calling "free" frees pointer "cmdMap" which has already been freed.
High Impact, CWE-415
USE_AFTER_FREE
Reason for change: Fix coverity issues in RRD
Test Procedure: Basic Sanity, Focused regression
Risks: Low
Signed-off-by: Abhinav P V [email protected]