MCPcopy Create free account
hub / github.com/RsyncProject/rsync / pool_destroy

Function pool_destroy

lib/pool_alloc.c:92–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void
93pool_destroy(alloc_pool_t p)
94{
95 struct alloc_pool *pool = (struct alloc_pool *) p;
96 struct pool_extent *cur, *next;
97
98 if (!pool)
99 return;
100
101 for (cur = pool->extents; cur; cur = next) {
102 next = cur->next;
103 if (pool->flags & POOL_PREPEND)
104 free(PTR_SUB(cur->start, sizeof (struct pool_extent)));
105 else {
106 free(cur->start);
107 free(cur);
108 }
109 }
110
111 free(pool);
112}
113
114void *
115pool_alloc(alloc_pool_t p, size_t len, const char *bomb_msg)

Callers 1

flist_freeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected