This change fixes a memory leak on server exit not destroying the shares.
The list of shares is not destroyed and left.
Fix this at the Hgfs server tear down by calling the shares reset with an
empty list which will cause all shares to be treated as stale and so deleted.
HgfsServerOplockDestroy();
}
if (gHgfsDirNotifyActive) {
+ DblLnkLst_Links emptySharesList;
+ DblLnkLst_Init(&emptySharesList);
+
+ /* Make all existing shared folders stale and delete them. */
+ HgfsServerSharesReset(&emptySharesList);
HgfsNotify_Exit();
gHgfsDirNotifyActive = FALSE;
Log("%s: exit notification - inactive.\n", __FUNCTION__);