MCPcopy Create free account
hub / github.com/F-Stack/f-stack / fcrypt_dtor

Function fcrypt_dtor

freebsd/opencrypto/cryptodev.c:1346–1361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1344}
1345
1346static void
1347fcrypt_dtor(void *data)
1348{
1349 struct fcrypt *fcr = data;
1350 struct csession *cse;
1351
1352 while ((cse = TAILQ_FIRST(&fcr->csessions))) {
1353 TAILQ_REMOVE(&fcr->csessions, cse, next);
1354 KASSERT(refcount_load(&cse->refs) == 1,
1355 ("%s: crypto session %p with %d refs", __func__, cse,
1356 refcount_load(&cse->refs)));
1357 cse_free(cse);
1358 }
1359 mtx_destroy(&fcr->lock);
1360 free(fcr, M_XDATA);
1361}
1362
1363static int
1364crypto_open(struct cdev *dev, int oflags, int devtype, struct thread *td)

Callers 1

crypto_openFunction · 0.85

Calls 3

refcount_loadFunction · 0.85
cse_freeFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected