Only free the pcpu cache buckets if they are non-NULL.
Crashed this person's machine: harti Pointy-hat to: me
This commit is contained in:
parent
515d4440fe
commit
174ab4501e
@ -513,10 +513,12 @@ cache_drain(uma_zone_t zone, int destroy)
|
||||
bucket_drain(zone, cache->uc_allocbucket);
|
||||
bucket_drain(zone, cache->uc_freebucket);
|
||||
if (destroy) {
|
||||
uma_zfree_internal(bucketzone, cache->uc_allocbucket,
|
||||
NULL, 0);
|
||||
uma_zfree_internal(bucketzone, cache->uc_freebucket,
|
||||
NULL, 0);
|
||||
if (cache->uc_allocbucket != NULL)
|
||||
uma_zfree_internal(bucketzone,
|
||||
cache->uc_allocbucket, NULL, 0);
|
||||
if (cache->uc_freebucket != NULL)
|
||||
uma_zfree_internal(bucketzone,
|
||||
cache->uc_freebucket, NULL, 0);
|
||||
cache->uc_allocbucket = cache->uc_freebucket = NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user