When the driver is unloaded, the memory must be freed. ddi_umem_free(9F) frees memory that was allocated by ddi_umem_alloc(9F).
void ddi_umem_free(ddi_umem_cookie_t cookie);
cookie is the kernel memory cookie returned by ddi_umem_alloc(9F).