diff --git a/daemon/namespace.c b/daemon/namespace.c index 863a5ae..a6f189e 100644 --- a/daemon/namespace.c +++ b/daemon/namespace.c @@ -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"); diff --git a/daemon/nfs41_client.c b/daemon/nfs41_client.c index 1a30c39..898a483 100644 --- a/daemon/nfs41_client.c +++ b/daemon/nfs41_client.c @@ -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); } diff --git a/daemon/pnfs_device.c b/daemon/pnfs_device.c index e4f03bb..e19bd99 100644 --- a/daemon/pnfs_device.c +++ b/daemon/pnfs_device.c @@ -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); } diff --git a/daemon/pnfs_layout.c b/daemon/pnfs_layout.c index 1a919ed..b8a72c1 100644 --- a/daemon/pnfs_layout.c +++ b/daemon/pnfs_layout.c @@ -129,7 +129,7 @@ void pnfs_layout_list_free( layout_state_free(state_entry(entry)); LeaveCriticalSection(&layouts->lock); - + DeleteCriticalSection(&layouts->lock); free(layouts); }