Skip to content

Commit

Permalink
Avoid infinite loop in done error
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Nov 14, 2023
1 parent 62810d9 commit edd1c3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rest_vol_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2887,20 +2887,20 @@ RV_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_attr_speci
case H5I_FILE:
case H5I_GROUP:
if (RV_group_close((void *)attr_parent, H5P_DEFAULT, NULL) < 0)
FUNC_GOTO_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close parent group");
FUNC_DONE_ERROR(H5E_SYM, H5E_CANTCLOSEOBJ, FAIL, "can't close parent group");
break;

case H5I_DATASET:
if (RV_dataset_close((void *)attr_parent, H5P_DEFAULT, NULL) < 0)
FUNC_GOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close parent dataset");
FUNC_DONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close parent dataset");
break;

case H5I_DATATYPE:
if (RV_datatype_close((void *)attr_parent, H5P_DEFAULT, NULL) < 0)
FUNC_GOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "can't close parent datatype");
FUNC_DONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "can't close parent datatype");

default:
FUNC_GOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL,
FUNC_DONE_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL,
"attribute's parent object is not group, dataset, or datatype");
break;
}
Expand Down

0 comments on commit edd1c3a

Please sign in to comment.