Source
990
990
*/
991
991
herr_t
992
992
H5A_free(H5A_t *attr)
993
993
{
994
994
herr_t ret_value = SUCCEED; /* Return value */
995
995
996
996
FUNC_ENTER_NOAPI(FAIL)
997
997
998
998
HDassert(attr);
999
999
1000
-
/* Free dynamicly allocated items */
1000
+
/* Free dynamically allocated items */
1001
1001
if(attr->shared->name) {
1002
1002
H5MM_xfree(attr->shared->name);
1003
1003
attr->shared->name = NULL;
1004
1004
}
1005
1005
if(attr->shared->dt) {
1006
1006
if(H5T_close(attr->shared->dt) < 0)
1007
1007
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release datatype info")
1008
1008
attr->shared->dt = NULL;
1009
1009
}
1010
1010
if(attr->shared->ds) {
1045
1045
1046
1046
HDassert(attr);
1047
1047
HDassert(attr->shared);
1048
1048
1049
1049
/* Close the object's symbol-table entry */
1050
1050
if(attr->obj_opened && (H5O_close(&(attr->oloc)) < 0))
1051
1051
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release object header info")
1052
1052
1053
1053
/* Reference count can be 0. It only happens when H5A_create fails. */
1054
1054
if(attr->shared->nrefs <= 1) {
1055
-
/* Free dynamicly allocated items */
1055
+
/* Free dynamically allocated items */
1056
1056
if(H5A_free(attr) < 0)
1057
1057
HGOTO_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't release attribute info")
1058
1058
1059
1059
/* Destroy shared attribute struct */
1060
1060
attr->shared = H5FL_FREE(H5A_shared_t, attr->shared);
1061
1061
} /* end if */
1062
1062
else {
1063
1063
/* There are other references to the shared part of the attribute.
1064
1064
* Only decrement the reference count. */
1065
1065
--attr->shared->nrefs;