1
1

Add tests to ensure that we are not destructing NULL-pointers.

This commit was SVN r2452.
Этот коммит содержится в:
Ralph Castain 2004-09-02 16:17:32 +00:00
родитель 5286e5205c
Коммит e5fab162ce
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -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);