OBD_ALLOC(lfa, size);
if (!lfa)
RETURN(-ENOMEM);
- OBD_ALLOC(rcs, sizeof(int) * nr);
+ OBD_ALLOC_PTR_ARRAY(rcs, nr);
if (!rcs)
GOTO(free_lfa, rc = -ENOMEM);
}
free_rcs:
- OBD_FREE(rcs, sizeof(int) * nr);
+ OBD_FREE_PTR_ARRAY(rcs, nr);
free_lfa:
OBD_FREE(lfa, size);