When removing the last reference to a cloner, do not try to unlock twice -

esp. not since the backing memory was just freed.

Reviewed by:	rwatson
This commit is contained in:
mlaier 2004-07-20 21:44:28 +00:00
parent fe7d16c708
commit f054f1f5be

View File

@ -94,9 +94,10 @@ LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners);
if (--(ifc)->ifc_refcnt == 0) { \
IF_CLONE_UNLOCK(ifc); \
if_clone_free(ifc); \
} \
} else { \
/* silently free the lock */ \
IF_CLONE_UNLOCK(ifc); \
} \
} while (0)
MALLOC_DEFINE(M_CLONE, "clone", "interface cloning framework");