if (hs->hs_buckets != NULL)
return hs;
- LIBCFS_FREE(hs, offsetof(struct cfs_hash, hs_name[len]));
+ LIBCFS_FREE(hs, sizeof(struct cfs_hash) + len);
RETURN(NULL);
}
EXPORT_SYMBOL(cfs_hash_create);
0, CFS_HASH_NBKT(hs));
i = cfs_hash_with_bigname(hs) ?
CFS_HASH_BIGNAME_LEN : CFS_HASH_NAME_LEN;
- LIBCFS_FREE(hs, offsetof(struct cfs_hash, hs_name[i]));
+ LIBCFS_FREE(hs, sizeof(struct cfs_hash) + i);
EXIT;
}