hyperv/vmbus: Use free(9) for interrupt page; it is allocated by malloc(9)

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5417
This commit is contained in:
Sepherosa Ziehau 2016-02-24 08:54:50 +00:00
parent fb05500b24
commit 600d84765f

View file

@ -248,10 +248,7 @@ hv_vmbus_connect(void) {
mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock);
if (hv_vmbus_g_connection.interrupt_page != NULL) {
contigfree(
hv_vmbus_g_connection.interrupt_page,
PAGE_SIZE,
M_DEVBUF);
free(hv_vmbus_g_connection.interrupt_page, M_DEVBUF);
hv_vmbus_g_connection.interrupt_page = NULL;
}
@ -279,7 +276,7 @@ hv_vmbus_disconnect(void) {
ret = hv_vmbus_post_message(&msg, sizeof(hv_vmbus_channel_unload));
contigfree(hv_vmbus_g_connection.interrupt_page, PAGE_SIZE, M_DEVBUF);
free(hv_vmbus_g_connection.interrupt_page, M_DEVBUF);
mtx_destroy(&hv_vmbus_g_connection.channel_msg_lock);