Skip to content

Commit

Permalink
Fix unnecessary memory allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
houjun committed Jul 18, 2023
1 parent 8259f51 commit 793e1e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/pdc_obj/pdc_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,9 +1237,9 @@ PDCobj_get_info(pdcid_t obj_id)

tmp = PDC_obj_get_info(obj_id);

ret_value = PDC_CALLOC(struct pdc_obj_info);
if (!ret_value)
PGOTO_ERROR(NULL, "failed to allocate memory");
/* ret_value = PDC_CALLOC(struct pdc_obj_info); */
/* if (!ret_value) */
/* PGOTO_ERROR(NULL, "failed to allocate memory"); */

ret_value = tmp->obj_info_pub;

Expand Down

0 comments on commit 793e1e8

Please sign in to comment.