Fix build and avoid a double-free in the VIMAGE case.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Bjoern A. Zeeb 2016-01-22 19:43:26 +00:00
parent bb84e3d77d
commit eef5775f02
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/vnet/; revision=294592

View File

@ -811,7 +811,9 @@ div_modevent(module_t mod, int type, void *unused)
ip_divert_ptr = NULL;
err = pf_proto_unregister(PF_INET, IPPROTO_DIVERT, SOCK_RAW);
INP_INFO_WUNLOCK(&V_divcbinfo);
div_destroy();
#ifndef VIMAGE
div_destroy(NULL);
#endif
EVENTHANDLER_DEREGISTER(maxsockets_change, ip_divert_event_tag);
break;
default: