mcctrl: fix NULL pointer dereference for unbooted OS instance shutdown

This commit is contained in:
Balazs Gerofi
2016-10-26 14:50:07 +09:00
parent f284a80656
commit 059fab2cc0
5 changed files with 34 additions and 7 deletions

View File

@ -311,6 +311,11 @@ void destroy_ikc_channels(ihk_os_t os)
int i;
struct mcctrl_usrdata *usrdata = ihk_host_os_get_usrdata(os);
if (!usrdata) {
printk("%s: WARNING: no mcctrl_usrdata found\n", __FUNCTION__);
return;
}
ihk_host_os_set_usrdata(os, NULL);
for (i = 0; i < usrdata->num_channels; i++) {