RETURN(rc = -ENOSPC);
}
- OBD_ALLOC(batch, nr_saved * sizeof(*batch));
+ OBD_ALLOC_PTR_ARRAY(batch, nr_saved);
if (batch == NULL)
RETURN(-ENOMEM);
continue;
ofd_object_put(env, fo);
}
- OBD_FREE(batch, nr_saved * sizeof(*batch));
+ OBD_FREE_PTR_ARRAY(batch, nr_saved);
CDEBUG((objects == 0 && rc == 0) ? D_ERROR : D_OTHER,
"created %d/%d objects: %d\n", objects, nr_saved, rc);