}
/* non-verbose query */
- LIBCFS_ALLOC(gentp, sizeof(struct lstcon_ndlist_ent));
+ CFS_ALLOC_PTR(gentp);
if (gentp == NULL) {
CERROR("Can't allocate ndlist_ent\n");
lstcon_group_decref(grp);
rc = copy_to_user(gents_p, gentp,
sizeof(struct lstcon_ndlist_ent)) ? -EFAULT : 0;
- LIBCFS_FREE(gentp, sizeof(struct lstcon_ndlist_ent));
+ CFS_FREE_PTR(gentp);
lstcon_group_decref(grp);
}
/* non-verbose query */
- LIBCFS_ALLOC(entp, sizeof(struct lstcon_test_batch_ent));
+ CFS_ALLOC_PTR(entp);
if (entp == NULL)
return -ENOMEM;
rc = copy_to_user(ent_up, entp,
sizeof(struct lstcon_test_batch_ent)) ? -EFAULT : 0;
- LIBCFS_FREE(entp, sizeof(struct lstcon_test_batch_ent));
+ CFS_FREE_PTR(entp)
return rc;
}