Might as well do this free a line earlier, in the block where we know it's not free(NULL); that's a no-op, but it's still a function call and we've already incurred the cost of checking.