Lines 489-495
Link Here
|
489 |
nv_stack_t *sp; |
489 |
nv_stack_t *sp; |
490 |
|
490 |
|
491 |
sp = sc->api_sp; |
491 |
sp = sc->api_sp; |
492 |
rm_free_unused_clients(sp, nv, filep); |
492 |
if (sp != NULL) { |
|
|
493 |
rm_free_unused_clients(sp, nv, filep); |
494 |
} else { |
495 |
device_printf(sc->dev, "Crash prevented in nvidia_close_ctl() (FreeBSD bug 195097).\n"); |
496 |
} |
493 |
|
497 |
|
494 |
if (--sc->refcnt == 0) { |
498 |
if (--sc->refcnt == 0) { |
495 |
NV_UMA_ZONE_FREE_STACK(sc->api_sp); |
499 |
NV_UMA_ZONE_FREE_STACK(sc->api_sp); |
Lines 594-602
Link Here
|
594 |
|
599 |
|
595 |
sc = nv->os_state; |
600 |
sc = nv->os_state; |
596 |
sp = sc->api_sp; |
601 |
sp = sc->api_sp; |
|
|
602 |
/* If nvidia_open_dev failed and we're called from nvidia_dev_dtor, we |
603 |
* already released api_sp. */ |
597 |
|
604 |
|
598 |
NV_PCI_CHECK_CONFIG_SPACE(sp, nv, TRUE, TRUE, TRUE); |
605 |
NV_PCI_CHECK_CONFIG_SPACE(sp, nv, TRUE, TRUE, TRUE); |
599 |
rm_free_unused_clients(sp, nv, filep); |
606 |
if (sp != NULL) { |
|
|
607 |
rm_free_unused_clients(sp, nv, filep); |
608 |
} else { |
609 |
device_printf(sc->dev, "Crash prevented in nvidia_close_dev() (FreeBSD bug 195097).\n"); |
610 |
} |
600 |
|
611 |
|
601 |
if (--sc->refcnt == 0) { |
612 |
if (--sc->refcnt == 0) { |
602 |
if (sc->UD_object != NULL) |
613 |
if (sc->UD_object != NULL) |