free critical sections with DeleteCriticalSection
This commit is contained in:
parent
572c69e3d0
commit
0694415a95
4 changed files with 6 additions and 2 deletions
|
|
@ -88,6 +88,7 @@ static void root_free(
|
|||
/* free clients */
|
||||
list_for_each_tmp(entry, tmp, &root->clients)
|
||||
nfs41_client_free(client_entry(entry));
|
||||
DeleteCriticalSection(&root->lock);
|
||||
free(root);
|
||||
|
||||
dprintf(NSLVL, "<-- nfs41_root_free()\n");
|
||||
|
|
|
|||
|
|
@ -337,6 +337,8 @@ void nfs41_client_free(
|
|||
nfs41_rpc_clnt_free(client->rpc);
|
||||
if (client->layouts) pnfs_layout_list_free(client->layouts);
|
||||
if (client->devices) pnfs_file_device_list_free(client->devices);
|
||||
DeleteCriticalSection(&client->state.lock);
|
||||
DeleteCriticalSection(&client->recovery.lock);
|
||||
free(client);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ static void file_device_free(
|
|||
{
|
||||
free(device->servers.arr);
|
||||
free(device->stripes.arr);
|
||||
DeleteCriticalSection(&device->device.lock);
|
||||
free(device);
|
||||
}
|
||||
|
||||
|
|
@ -156,7 +157,7 @@ void pnfs_file_device_list_free(
|
|||
file_device_free(device_entry(entry));
|
||||
|
||||
LeaveCriticalSection(&devices->lock);
|
||||
|
||||
DeleteCriticalSection(&devices->lock);
|
||||
free(devices);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ void pnfs_layout_list_free(
|
|||
layout_state_free(state_entry(entry));
|
||||
|
||||
LeaveCriticalSection(&layouts->lock);
|
||||
|
||||
DeleteCriticalSection(&layouts->lock);
|
||||
free(layouts);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue