Skip to content

Commit

Permalink
Cleanup memory handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Aug 4, 2023
1 parent 84f7509 commit cd66b48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/rest_vol_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ RV_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_object_get_ar
? strlen(name)
: args->args.get_name.buf_size - 1;
strncpy(args->args.get_name.buf, name, copy_size);
args->args.get_name.buf[copy_size + 1] = '\0';
}

if (args->args.get_name.name_len) {
Expand Down Expand Up @@ -813,7 +812,7 @@ RV_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_object_s
/* Increment refs for top-level file */
loc_obj->domain->u.file.ref_count++;

if ((iter_object = RV_malloc(sizeof(RV_object_t))) == NULL)
if ((iter_object = RV_calloc(sizeof(RV_object_t))) == NULL)
FUNC_GOTO_ERROR(H5E_OBJECT, H5E_CANTALLOC, FAIL,
"couldn't allocate space for iteration object");

Expand Down

0 comments on commit cd66b48

Please sign in to comment.