Cleanup Coverity warnings
Этот коммит содержится в:
родитель
37ad6aa711
Коммит
2b55ee8118
6
opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c
Обычный файл → Исполняемый файл
6
opal/mca/pmix/pmix2x/pmix/src/client/pmix_client_get.c
Обычный файл → Исполняемый файл
@ -598,13 +598,13 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
||||
/* if we are seeking "pmix" data for our own nspace, then we must fail
|
||||
* as it was provided at startup - any updates would have come via
|
||||
* event notifications */
|
||||
if (0 == strncmp(cb->key, "pmix", 4) &&
|
||||
if (NULL != cb->key && 0 == strncmp(cb->key, "pmix", 4) &&
|
||||
0 == strncmp(cb->nspace, pmix_globals.myid.nspace, PMIX_MAX_NSLEN)) {
|
||||
cb->value_cbfunc(PMIX_ERR_NOT_FOUND, NULL, cb->cbdata);
|
||||
PMIX_RELEASE(cb);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* see if we already have a request in place with the server for data from
|
||||
* this nspace:rank. If we do, then no need to ask again as the
|
||||
* request will return _all_ data from that proc */
|
||||
@ -631,7 +631,7 @@ static void _getnbfn(int fd, short flags, void *cbdata)
|
||||
"%s:%d REQUESTING DATA FROM SERVER FOR %s:%d KEY %s",
|
||||
pmix_globals.myid.nspace, pmix_globals.myid.rank,
|
||||
cb->nspace, cb->rank, cb->key);
|
||||
|
||||
|
||||
/* create a callback object as we need to pass it to the
|
||||
* recv routine so we know which callback to use when
|
||||
* the return message is recvd */
|
||||
|
14
opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c
Обычный файл → Исполняемый файл
14
opal/mca/pmix/pmix2x/pmix/src/server/pmix_server_get.c
Обычный файл → Исполняемый файл
@ -103,7 +103,9 @@ static pmix_status_t create_local_tracker(char nspace[], int rank,
|
||||
static void relfn(void *cbdata)
|
||||
{
|
||||
char *data = (char*)cbdata;
|
||||
free(data);
|
||||
if (NULL != data) {
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -199,7 +201,7 @@ pmix_status_t pmix_server_get(pmix_buffer_t *buf,
|
||||
cbfunc(PMIX_SUCCESS, data, sz, cbdata, relfn, data);
|
||||
return PMIX_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* We have to wait for all local clients to be registered before
|
||||
* we can know whether this request is for data from a local or a
|
||||
* remote client because one client might ask for data about another
|
||||
@ -419,7 +421,8 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, int rank, pmix_serve
|
||||
cur_rank = PMIX_RANK_WILDCARD;
|
||||
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(&pbkt, &cur_rank, 1, PMIX_INT))) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
cbfunc(rc, NULL, 0, cbdata, relfn, data);
|
||||
PMIX_DESTRUCT(&pbkt);
|
||||
cbfunc(rc, NULL, 0, cbdata, NULL, NULL);
|
||||
return rc;
|
||||
}
|
||||
/* the client is expecting this to arrive as a byte object
|
||||
@ -427,11 +430,12 @@ static pmix_status_t _satisfy_request(pmix_nspace_t *nptr, int rank, pmix_serve
|
||||
pbptr = &nptr->server->job_info;
|
||||
if (PMIX_SUCCESS != (rc = pmix_bfrop.pack(&pbkt, &pbptr, 1, PMIX_BUFFER))) {
|
||||
PMIX_ERROR_LOG(rc);
|
||||
cbfunc(rc, NULL, 0, cbdata, relfn, data);
|
||||
PMIX_DESTRUCT(&pbkt);
|
||||
cbfunc(rc, NULL, 0, cbdata, NULL, NULL);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
while (NULL != *htptr) {
|
||||
cur_rank = rank;
|
||||
if (PMIX_RANK_UNDEF == rank) {
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user