Do not free it. In case of sparse representation, possibly induce the addition of a new linear term.
Return NULL if:
dim>=e->size
dim==AP_DIM_MAX