Release the chain of blocks used for pool allocations. */
| 477 | |
| 478 | /* Release the chain of blocks used for pool allocations. */ |
| 479 | void poolAllocRelease(RedisModuleCtx *ctx) { |
| 480 | RedisModulePoolAllocBlock *head = ctx->pa_head, *next; |
| 481 | |
| 482 | while(head != NULL) { |
| 483 | next = head->next; |
| 484 | zfree(head); |
| 485 | head = next; |
| 486 | } |
| 487 | ctx->pa_head = NULL; |
| 488 | } |
| 489 | |
| 490 | /* Return heap allocated memory that will be freed automatically when the |
| 491 | * module callback function returns. Mostly suitable for small allocations |
no test coverage detected