Add tests to ensure that we are not destructing NULL-pointers.
This commit was SVN r2452.
Этот коммит содержится в:
родитель
5286e5205c
Коммит
e5fab162ce
@ -73,11 +73,13 @@ static void ompi_list_destruct(ompi_list_t *list)
|
||||
{
|
||||
ompi_list_item_t *item;
|
||||
|
||||
while (NULL != (item = ompi_list_remove_first(list))) {
|
||||
OBJ_RELEASE(item);
|
||||
}
|
||||
if (NULL != list) {
|
||||
while (NULL != (item = ompi_list_remove_first(list))) {
|
||||
OBJ_RELEASE(item);
|
||||
}
|
||||
|
||||
ompi_list_construct(list);
|
||||
ompi_list_construct(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -164,7 +164,9 @@ int gpr_replica_put(ompi_registry_mode_t addr_mode, char *segment,
|
||||
}
|
||||
|
||||
/* release list of keys */
|
||||
OBJ_RELEASE(keylist);
|
||||
if (NULL != keylist) {
|
||||
OBJ_RELEASE(keylist);
|
||||
}
|
||||
|
||||
return return_code;
|
||||
}
|
||||
@ -265,7 +267,9 @@ int gpr_replica_delete_object(ompi_registry_mode_t addr_mode,
|
||||
|
||||
|
||||
CLEANUP:
|
||||
OBJ_RELEASE(keylist);
|
||||
if (NULL != keylist) {
|
||||
OBJ_RELEASE(keylist);
|
||||
}
|
||||
|
||||
if (NULL != keys) {
|
||||
free(keys);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user