Print this page
patch tsoome-feedback
6659 nvlist_free(NULL) is a no-op
*** 4399,4420 ****
* This needs to happen before we grab any locks to avoid deadlock
* (another lwp in the process could be waiting for the held lock).
*/
if (curthread != pp->p_agenttp && !holdlwps(SHOLDFORK)) {
zone_free(zone);
- if (rctls)
nvlist_free(rctls);
return (zone_create_error(error, 0, extended_error));
}
if (block_mounts(zone) == 0) {
mutex_enter(&pp->p_lock);
if (curthread != pp->p_agenttp)
continuelwps(pp);
mutex_exit(&pp->p_lock);
zone_free(zone);
- if (rctls)
nvlist_free(rctls);
return (zone_create_error(error, 0, extended_error));
}
/*
--- 4399,4418 ----
*** 4556,4566 ****
zone_status_wait(zone, ZONE_IS_READY);
/*
* The zone is fully visible, so we can let mounts progress.
*/
resume_mounts(zone);
- if (rctls)
nvlist_free(rctls);
return (zoneid);
errout:
--- 4554,4563 ----
*** 4572,4582 ****
if (curthread != pp->p_agenttp)
continuelwps(pp);
mutex_exit(&pp->p_lock);
resume_mounts(zone);
- if (rctls)
nvlist_free(rctls);
/*
* There is currently one reference to the zone, a cred_ref from
* zone_kcred. To free the zone, we call crfree, which will call
* zone_cred_rele, which will call zone_free.
--- 4569,4578 ----
*** 6873,6883 ****
mutex_enter(&zone->zone_lock);
if ((zdl = zone_find_dl(zone, linkid)) == NULL) {
err = ENXIO;
} else {
list_remove(&zone->zone_dl_list, zdl);
- if (zdl->zdl_net != NULL)
nvlist_free(zdl->zdl_net);
kmem_free(zdl, sizeof (zone_dl_t));
}
mutex_exit(&zone->zone_lock);
zone_rele(zone);
--- 6869,6878 ----