MCPcopy Create free account
hub / github.com/documentdb/documentdb / FreeUserRoleEntryTable

Function FreeUserRoleEntryTable

pg_documentdb/src/commands/users.c:1943–1961  ·  view source on GitHub ↗

* FreeUserRoleEntryTable cleans up the user roles hash table and all nested role hash tables. */

Source from the content-addressed store, hash-verified

1941 * FreeUserRoleEntryTable cleans up the user roles hash table and all nested role hash tables.
1942 */
1943static void
1944FreeUserRoleEntryTable(HTAB *userRolesTable)
1945{
1946 if (userRolesTable != NULL)
1947 {
1948 HASH_SEQ_STATUS status;
1949 UserRoleHashEntry *userRoleEntry;
1950 hash_seq_init(&status, userRolesTable);
1951 while ((userRoleEntry = hash_seq_search(&status)) != NULL)
1952 {
1953 if (userRoleEntry->roles != NULL)
1954 {
1955 hash_destroy(userRoleEntry->roles);
1956 }
1957 }
1958
1959 hash_destroy(userRolesTable);
1960 }
1961}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected