Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions utils/rbuscli/rbuscli.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ void execute_discover_component_cmd(int argc, char* argv[])
int index = 0;
int i;
int componentCnt = 0;
char **pComponentNames;
char **pComponentNames = NULL;
char const* pElementNames[RBUS_CLI_MAX_PARAM] = {0, 0};

if (!verify_rbus_open())
Expand Down Expand Up @@ -1000,6 +1000,8 @@ void execute_discover_component_cmd(int argc, char* argv[])
else
{
printf ("Failed to discover components. Error Code = %d\r\n", rc);
free(pComponentNames);
return;
}
}

Expand All @@ -1009,7 +1011,7 @@ void execute_discover_elements_cmd(int argc, char *argv[])
int numOfInputParams = argc - 2;
bool nextLevel = true;
int numElements = 0;
char** pElementNames; // FIXME: every component will have more than RBUS_CLI_MAX_PARAM elements right?
char** pElementNames = NULL; // FIXME: every component will have more than RBUS_CLI_MAX_PARAM elements right?

if (!verify_rbus_open())
return;
Expand Down Expand Up @@ -1045,14 +1047,16 @@ void execute_discover_elements_cmd(int argc, char *argv[])
else
{
printf ("Failed to discover elements. Error Code = %d\r\n", rc);
free(pElementNames);
return;
}
}

void execute_discover_wildcard_dests_cmd(int argc, char* argv[])
{
rbusCoreError_t rc = RBUSCORE_SUCCESS;
int numDestinations = 0;
char** destinations;
char** destinations = NULL;

(void)argc;
(void)argv;
Expand Down Expand Up @@ -1089,6 +1093,8 @@ void execute_discover_wildcard_dests_cmd(int argc, char* argv[])
else
{
printf ("Failed to discover components. Error Code = %d\r\n", rc);
free(destinations);
return;
}
}

Expand Down