Skip to content

Commit

Permalink
"rbuscli get Device.WiFi." failed with Segmentation fault
Browse files Browse the repository at this point in the history
Reason for change: The crash occurred due to an invalid memory 
    access. The rbusProperty_Release() function is to release local 
    variables that have previously been freed. 
    To resolve the problem, the local variable was initialized with "NULL".         
Signed-off-by: Netaji Panigrahi [email protected]
  • Loading branch information
NetajiPanigrahi authored Jun 27, 2024
1 parent ffee8e8 commit 509f7fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rbus/rbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -3494,7 +3494,7 @@ rbusError_t rbus_getExt(rbusHandle_t handle, int paramCount, char const** pParam
}
else
{
rbusProperty_t tmpProperties;
rbusProperty_t tmpProperties = NULL;

if((errorcode = _getExt_response_parser(response, &tmpNumOfValues, &tmpProperties)) != RBUS_ERROR_SUCCESS)
{
Expand Down Expand Up @@ -3642,7 +3642,7 @@ rbusError_t rbus_getExt(rbusHandle_t handle, int paramCount, char const** pParam
}
else
{
rbusProperty_t batchResult;
rbusProperty_t batchResult = NULL;
int batchNumVals;
if((errorcode = _getExt_response_parser(response, &batchNumVals, &batchResult)) != RBUS_ERROR_SUCCESS)
{
Expand Down

0 comments on commit 509f7fc

Please sign in to comment.